Skip to content

Use npm root to find directory to place .bin #3

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

goodsky
Copy link

@goodsky goodsky commented Feb 13, 2024

The npm bin command was removed in npm 9+ (codesuki/add-node-modules-path#23) so using this method to detect the .bin directory fails for up-to-date node installations. On Linux, the env.PWD fallback appears to work. However, this approach does not work for Windows.

This PR proposes using the npm root command instead. This is a recommended workaround in the GitHub issue linked above. This should resolve disparities between installing @boardzilla/devtools using npm vs. yarn (where yarn still has a yarn bin command).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant