无法安装npm

时间:2017-02-09 16:18:35

标签: node.js npm npm-install

安装节点js并下载angular2-boiler-plate我尝试使用命令npm install进行安装,该命令反复出现以下错误:

C:\angular-2-beta-boilerplate-master>npm install
npm WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or
 locked, rename 'C:\Users\DELLPC~1\AppData\Local\Temp\npm-2384-e547d8c2\registry
.npmjs.org\bcrypt-pbkdf\-\bcrypt-pbkdf-1.0.1.tgz.2305053814' -> 'C:\Users\DELLPC
~1\AppData\Local\Temp\npm-2384-e547d8c2\registry.npmjs.org\bcrypt-pbkdf\-\bcrypt
-pbkdf-1.0.1.tgz'
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10

npm ERR! tarball.destroy is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

> buffertools@2.1.4 install C:\angular-2-beta-boilerplate-master\node_modules\bu
ffertools
> node-gyp rebuild


C:\angular-2-beta-boilerplate-master\node_modules\buffertools>if not defined npm
_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bi
n\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild
 )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:404:11
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\grac
eful-fs\polyfills.js:264:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\angular-2-beta-boilerplate-master\node_modules\buffertools
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
angular2-boilerplate@1.0.0 C:\angular-2-beta-boilerplate-master
`-- lite-server@2.2.2
  `-- browser-sync@2.18.7
    `-- localtunnel@1.8.2
      `-- request@2.78.0
        `-- http-signature@1.1.1
          `-- sshpk@1.10.2
            `-- bcrypt-pbkdf@1.0.1

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN angular2-boilerplate@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: buffertools@2.1.4 (node_modules\
buffertools):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: buffertools@2.1.4 install: `node
-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10

npm ERR! Callback called more than once.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\angular-2-beta-boilerplate-master\npm-debug.log

1 个答案:

答案 0 :(得分:0)

检查您的存储库中是否有一个package.json,如果npm是install:

npm -v

如果出现此错误:tarball.destroy是由反恶意软件引起的。卸载后,npm工作。