cmb97 cmb97 - 27 days ago 25
Node.js Question

npm install gulp ERROR

I'm opening this issue because:
npm cannot install gulp

I receive the following error:

Can anyone please tell me how to fix it?

I already installed express using npm install express without errors.

C:\node\demo>npm install gulp
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
demo@1.0.0 C:\node\demo
+-- archy@1.0.0 extraneous
+-- chalk@1.1.3 extraneous
+-- deprecated@0.0.1 extraneous
+-- interpret@1.0.1 extraneous
+-- liftoff@2.3.0 extraneous
+-- minimist@1.2.0 extraneous
+-- orchestrator@0.3.8 extraneous
+-- pretty-hrtime@1.0.3 extraneous
+-- semver@4.3.6 extraneous
+-- tildify@1.2.0 extraneous
+-- v8flags@2.0.11 extraneous
`-- vinyl-fs@0.3.14 extraneous

npm WARN demo@1.0.0 No description
npm WARN demo@1.0.0 No repository field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! path C:\node\demo\node_modules\.staging\has-gulplog-81b2f541
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:111:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\node\demo\node_modules\.staging\has-gulplog-81b2f541' -> 'C:\node\demo\node_modules\has-gulplog'
npm ERR! { Error
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:111:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\node\demo\node_modules\.staging\has-gulplog-81b2f541' -> 'C:\node\demo\node_modules\has-gulplog' parent: 'demo' }
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! C:\node\demo\npm-debug.log

Answer

You are getting this error because you´re trying to install the package using a cmd not launched in admin mode.