You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/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
The text was updated successfully, but these errors were encountered:
/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
The text was updated successfully, but these errors were encountered: