npm install gulp ERROR

时间:2016-11-10 01:28:22

标签: node.js npm gulp

我打开这个问题是因为: npm无法安装gulp

我收到以下错误:

有谁能告诉我如何解决它?

我已经使用npm install express安装了express而没有错误。

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

1 个答案:

答案 0 :(得分:0)

您收到此错误是因为您尝试使用未在管理员模式下启动的cmd安装软件包。