Skip to content

fix: shell command syntax #1699

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

Merged
merged 1 commit into from
Aug 20, 2025
Merged

fix: shell command syntax #1699

merged 1 commit into from
Aug 20, 2025

Conversation

dnhn
Copy link
Contributor

@dnhn dnhn commented Aug 20, 2025

Problem

I followed the instructions and got this error when running an NPM package globally:

Path "/Users/me/~/.npm-global/lib/node_modules" does not exist.
Please check the NODE_PATH environment variable.

In .npmrc the prefix was set to:

prefix=~/.npm-global

~ is not expanded here so NPM looks for a literal ~/ path instead of the home directory.

Solution

Use the absolute path instead:

prefix=/Users/me/.npm-global

Run npm config without quotes around the path so that ~ is properly expanded.

Remove the quotes so that the path can be expanded.
@dnhn dnhn requested review from leobalter and a team as code owners August 20, 2025 12:19
@wraithgar wraithgar merged commit ca92818 into npm:main Aug 20, 2025
8 of 9 checks passed
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.

2 participants