Reputation: 61
I am trying to install Bower globally and it is installed in the directory of
C:\Users\{{user}}\AppData\Roaming\npm\node_modules\bower
I have added the system path of Path and NODE_PATH to that of above, however when running bower, it still cant find the modules.
the prefix of npm-config is:
C:\Users\{{user}}\AppData\Roaming\npm
however later within the the list it states it as "C:\Program Files (x86)\nodejs" (overridden)
Ive run out of ideas of what it could be,
Upvotes: 2
Views: 10929
Reputation: 1035
If you using npm, which looks like you are, then use the global flag (run as admin)
npm install -g bower
Upvotes: 15
Reputation: 577
Sometimes another version or just a wrong path is referenced in the npm config file instead of the installed version.
This may cause node/npm to misplace global modules.
To check and fix:
npm config list
prefix
. prefix
is the same path (only without node.exe) as the actually installed node.exe path.node bin location
)If it's not, change it:
npm config set prefix "C:\Program Files\nodejs"
(change path if needed)Reinstall the module/package you tried to install, don't forget -g for global.
Upvotes: 1