Created
April 8, 2016 00:35
-
-
Save rangedsp/7eceb320fea00b344dbdd17cd154cdef to your computer and use it in GitHub Desktop.
Global install fails in Bash on Ubuntu on Windows (fresh install)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@localhost:~# npm install -g gulp | |
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. | |
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. | |
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. | |
/root/.npm-global/lib | |
└── (empty) | |
npm ERR! Linux 3.4.0+ | |
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "gulp" | |
npm ERR! node v5.10.1 | |
npm ERR! npm v3.8.3 | |
npm ERR! path /root/.npm-global/lib/node_modules/.staging/ansi-regex-b1c1d3b1 | |
npm ERR! code EACCES | |
npm ERR! errno -13 | |
npm ERR! syscall rename | |
npm ERR! Error: EACCES: permission denied, rename '/root/.npm-global/lib/node_modules/.staging/ansi-regex-b1c1d3b1' -> '/root/.npm-global/lib/node_modules/gulp/node_modules/ansi-regex' | |
npm ERR! at destStatted (/usr/lib/node_modules/npm/lib/install/action/finalize.js:25:7) | |
npm ERR! at FSReqWrap.oncomplete (fs.js:82:15) | |
npm ERR! | |
npm ERR! Error: EACCES: permission denied, rename '/root/.npm-global/lib/node_modules/.staging/ansi-regex-b1c1d3b1' -> '/root/.npm-global/lib/node_modules/gulp/node_modules/ansi-regex' | |
npm ERR! at Error (native) | |
npm ERR! { [Error: EACCES: permission denied, rename '/root/.npm-global/lib/node_modules/.staging/ansi-regex-b1c1d3b1' -> '/root/.npm-global/lib/node_modules/gulp/node_modules/ansi-regex'] parent: 'gulp' } | |
npm ERR! | |
npm ERR! Please try running this command again as root/Administrator. | |
npm ERR! Please include the following file with any support request: | |
npm ERR! /root/npm-debug.log | |
npm ERR! code 1 |
Same issue here. Here's what I've tried:
- Run as Admin
- sudo
- Reinstall Node
- Remove and reinstall all modules
- Reboot
Still have this problem.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had the same error. You know how to fix this?