https://pantsbuild.org/ logo
#general
Title
# general
q

quiet-evening-25363

06/02/2022, 1:52 AM
hello! I've run into an issue with using packaging my typescript frontend in a Docker image. we're using next.js, which has hooks around file naming, and encourages you to name things with [ square brackets ]. When trying to create a files target, I'm getting the
must have 1 file, but it had 0 files
error on one of these square bracket files, but I can't seem to find a way around it. I did try adding a pants_ignore rule to pants.toml, but it did not make a difference. I could not figure out the correct way to escape the brackets, so I am using *, which you'll see in my BUILD file. My assumption is that it's the square brackets messing things up, but would appreciate any help/thoughts you might have!
here is my build file directly trying to import that single file, and the error
and I also get the same error if I ** include all the files I actually need too
pants package on that Dockerfile works if I remove the file
f

fast-nail-55400

06/02/2022, 2:14 AM
What version of Pants are you using? The following issue seems on-point and appears to have been fixed: https://github.com/pantsbuild/pants/issues/15381
q

quiet-evening-25363

06/02/2022, 2:17 AM
oh wow, don't know how I missed that! I'm on version 2.9, so that's very likely the fix I need. thank you!
f

fast-nail-55400

06/02/2022, 2:18 AM
from what I can tell, the fix is in 2.11.1rc0 (latest is 2.11.1rc1). I don’t see a fix for 2.9.x or 2.10.x.
q

quiet-evening-25363

06/02/2022, 2:19 AM
ok great thanks, I'll give that a try 👍
upgrading to 2.11.1rc1 (did not try rc0) fixed it, thanks!
f

fast-nail-55400

06/02/2022, 10:30 PM
👍
8 Views