Skip to content
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

Check and Validate npmrc #34

Open
frank-dspeed opened this issue Aug 10, 2021 · 0 comments
Open

Check and Validate npmrc #34

frank-dspeed opened this issue Aug 10, 2021 · 0 comments

Comments

@frank-dspeed
Copy link
Member

/etc/npmrc
/home/youruser/.npmrc
/root/.npmrc
./.npmrc in the current directory next to package.json file (thanks to @CyrillePontvieux)
on windows:

c/Program\ Files/nodejs/node_modules/npm/npmrc
Then in this file the prefix is configured:

prefix=/usr
The prefix is defaulted to /usr in linux, to ${APPDATA}\npm in windows

The node modules are under $prefix tree, and the path should contain $prefix/bin

There may be a problem :

When you install globally, you use "sudo su" then the /root/.npmrc may be used!
When you use locally without sudo: for your user its the /home/youruser/.npmrc.
When your path doesn't represent your prefix
When you use npm set -g prefix /usr it sets the /etc/npmrc global, but doesn't override the local

Why?

in a open-pwa environment it is importent that we control what packages get requeired where.
make sure via "npm root -g" that it matches open-pwa

"npm config ls" lists loaded config

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

No branches or pull requests

1 participant