-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: 'node_modules/.bin' directory not created in sandbox #630
Comments
Thanks for the issue. It is possible to configure the bins for any package manually using the Line 65 in dc854ec
For rules_js to do this automatically we will need an upstream change in pnpm so that the lock file has the listing of bins for each package instead of just the current We have a feature request up to pnpm but so far no activity. The change upstream in pnpm will be relatively small so we if we don't see activity on the request we'll make a PR at some point. |
Hey Greg, thanks so much. I totally missed the That would be amazing if pnpm can add the bins information to its lock file, and would make sense. I think it's great that you guys took the lazy-fetching approach that you did with regards to downloading only the npm packages that are needed for any given build, so I'm definitely more than willing to specify the binaries myself inside Thanks again for the info. Do you want me to keep this issue open for tracking or did you have a different one? |
What does the bins attribute do? Does it somehow generate a js_binary rule? I don't see how to use it. |
It generates the |
Let's keep the issue open. Marked it as blocked by pnpm/pnpm#5131. |
What happened?
Hey guys, so I came across an interesting scenario: I'm using icon-font-buildr to generate a font file, and the utility tries to spawn a process as part of its execution:
npx svg2ttf
Unfortunately, because
node_modules/.bin/svg2ttf
is not found,npx
instead tries to download the package and store it in/users/<user>/.npm/_npx/61742
, resulting in the following error:Would it be possible to create the
node_modules/.bin
directory for the Bazel sandbox? Seems like this would get this particular package to work, along with any other packages that rely on calling thenpx
command internally.The
npx
call can be seen in the source code here btw: https://github.com/fabiospampinato/icon-font-buildr/blob/master/src/index.ts#L387Version
Development (host) and target OS/architectures: MacOS Monterey
Output of
bazel --version
: 6.0.0-pre.20221020.1Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file: rules_js 1.6.8Language(s) and/or frameworks involved: JS
How to reproduce
BUILD:
test-icon-font-buildr.js:
Command:
Any other information?
No response
Fund our work
The text was updated successfully, but these errors were encountered: