I continue to get permissions errors on Windows 7 when trying to npm install certain modules. A global install of gulp for example results in this:
c:\Users\abc\Documents\uniform\UniServer\www\ur>npm install -g gulp / > [email protected] install C:\Users\abc\AppData\Roaming\npm\node_modules\gulp\node_modules\v8flags > node fetch.js flags for v8 3.14.5.9 cached. npm ERR! Error: EPERM, open 'C:\Users\abc\Documents\uniform\UniServer\www\npmcache\c14291c8-che- ansi-regex-0-2-1-package-tgz.lock' npm ERR! { [Error: EPERM, open 'C:\Users\abc\Documents\uniform\UniServer\www\npmcache\c14291c8- che-ansi-regex-0-2-1-package-tgz.lock'] npm ERR! errno: 50, npm ERR! code: 'EPERM', npm ERR! path: 'C:\\Users\\abc\\Documents\\uniform\\UniServer\\www\\npmcache\\c14291c8-che-ans i-regex-0-2-1-package-tgz.lock' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\n pm\\bin\\npm-cli.js" "install" "-g" "gulp" npm ERR! cwd c:\Users\abc\Documents\uniform\UniServer\www\ur npm ERR! node -v v0.10.32 npm ERR! npm -v 1.4.28 npm ERR! path C:\Users\abc\Documents\uniform\UniServer\www\npmcache\c14291c8-che-ansi-regex-0-2- 1-package-tgz.lock npm ERR! code EPERM npm ERR! errno 50 npm ERR! stack Error: EPERM, open 'C:\Users\abc\Documents\uniform\UniServer\www\npmcache\c14291c 8-che-ansi-regex-0-2-1-package-tgz.lock' npm ERR! not ok code 0
I get this error while running cmd as administrator. I've read in other SO posts that this may represent a missing program. git
is installed and works so it's not that. bower
is installed and works. I've tried adding c:\windows\system32
to the system PATH. No help. As you may be able to tell, I modified the location of my NPM cache thinking that perhaps the folder it was in by default had some sort of permissions issue. No help there either. I've tried adding the --no-bin-links option, doesn't help. I'm really at a loss as to what is causing this problem. Have the same issue trying to install slush-mongo
, either globally or locally.
I had the same problem and found these command-line flags that seem to fix it without having to disable AV:
npm install --cache-lock-retries 1000 --cache-lock-wait 100000
You can change the default values (so you don't need to add the command-line options every time) by running:
npm config set cache-lock-retries 1000
npm config set cache-lock-wait 100000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With