node.js - pomelo安装遇到的问题
ringa_lee
ringa_lee 2017-04-17 11:32:49
0
1
832

搞了好几天,还是没搞定(window和mac都失败了),错误日志如下
node版本:0.10.22
环境:window
python:2.7.5
vs:08-13每个版本都有

这个是npm-debug.log输出的错误部分日志

4630 verbose true,C:\Users\Administrator\AppData\Roaming\npm\node_modules,C:\Users\Administrator\AppData\Roaming\npm\node_modules unbuild pomelo@1.1.2
4631 verbose C:\Users\Administrator\AppData\Roaming\npm,[object Object] binRoot
4632 info postuninstall pomelo@1.1.2
4633 error EEXIST, mkdir 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\pomelo-scheduler\node_modules\log4js\examples'
File exists: C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\pomelo-scheduler\node_modules\log4js\examples
Move it away, and try again.
4634 error System Windows_NT 6.1.7601
4635 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "pomelo"
4636 error cwd C:\Users\Administrator
4637 error node -v v0.10.22
4638 error npm -v 1.3.14
4639 error path C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\pomelo-scheduler\node_modules\log4js\examples
4640 error fstream_path C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\pomelo-scheduler\node_modules\log4js\examples\example-socket.js
4641 error fstream_type File
4642 error fstream_class FileWriter
4643 error code EEXIST
4644 error errno 47
4645 error fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:171:23
4645 error fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:37:53
4645 error fstream_stack Object.oncomplete (fs.js:107:15)
4646 verbose exit [ 47, true ]

这个命令窗口输出的部分内容

npm http 304 https://registry.npmjs.org/async/0.1.15
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/semver

> heapdump@0.2.9 install C:\Users\Administrator\AppData\Roaming\npm\node_modules
\pomelo\node_modules\pomelo-admin\node_modules\heapdump
> node-gyp rebuild


C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\node_modules\pome
lo-admin\node_modules\heapdump>node "C:\Program Files\nodejs\node_modules\npm\bi
n\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:980:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:771:
34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\node
_modules\pomelo-admin\node_modules\heapdump
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.11.0
gyp ERR! not ok
npm http GET https://registry.npmjs.org/log4js
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/string_decoder

> ws@0.4.25 install C:\Users\Administrator\AppData\Roaming\npm\node_modules\pome
lo\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws>n
ode "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modul
es\node-gyp\bin\node-gyp.js" rebuild






npm http 304 https://registry.npmjs.org/log4js
npm http 304 https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/base64-js/0.0.2
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/to-utf8/0.0.1
npm http 304 https://registry.npmjs.org/base64-js/0.0.2
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Users\Administrator\AppD
ata\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\socke
t.io-client\dist'
npm ERR! error rolling back  pomelo-admin@0.4.1 { [Error: ENOTEMPTY, rmdir 'C:\U
sers\Administrator\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-a
dmin\node_modules\socket.io-client\dist']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Users\\Administrator\\AppData\\Roaming\
\npm\\node_modules\\pomelo\\node_modules\\pomelo-admin\\node_modules\\socket.io-
client\\dist' }
npm ERR! EEXIST, mkdir 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\
pomelo\node_modules\pomelo-admin\node_modules\pomelo-scheduler\node_modules\log4
js\examples'
File exists: C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\node
_modules\pomelo-admin\node_modules\pomelo-scheduler\node_modules\log4js\examples

Move it away, and try again.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "pomelo"
npm ERR! cwd C:\Users\Administrator
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\nod
e_modules\pomelo-admin\node_modules\pomelo-scheduler\node_modules\log4js\example
s
npm ERR! fstream_path C:\Users\Administrator\AppData\Roaming\npm\node_modules\po
melo\node_modules\pomelo-admin\node_modules\pomelo-scheduler\node_modules\log4js
\examples\example-socket.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst
ream\lib\writer.js:171:23
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\mkd
irp\index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/to-utf8/0.0.1
npm ERR! Error: ENOENT, lstat 'C:\Users\Administrator\AppData\Roaming\npm\node_m
odules\pomelo\node_modules\pomelo-scheduler\node_modules\log4js\examples\smtp-ap
pender.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "pomelo"
npm ERR! cwd C:\Users\Administrator
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\nod
e_modules\pomelo-scheduler\node_modules\log4js\examples\smtp-appender.js
npm ERR! fstream_path C:\Users\Administrator\AppData\Roaming\npm\node_modules\po
melo\node_modules\pomelo-scheduler\node_modules\log4js\examples\smtp-appender.js

npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst
ream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'C:\Users\Administrator\AppData\Roaming\npm\node_m
odules\pomelo\node_modules\socket.io\node_modules\redis\examples\psubscribe.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "pomelo"
npm ERR! cwd C:\Users\Administrator
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\nod
e_modules\socket.io\node_modules\redis\examples\psubscribe.js
npm ERR! fstream_path C:\Users\Administrator\AppData\Roaming\npm\node_modules\po
melo\node_modules\socket.io\node_modules\redis\examples\psubscribe.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst
ream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'C:\Users\Administrator\AppData\Roaming\npm\node_m
odules\pomelo\node_modules\cliff\node_modules\winston\test\fixtures\keys\agent2-
key.pem'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "pomelo"
npm ERR! cwd C:\Users\Administrator
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\nod
e_modules\cliff\node_modules\winston\test\fixtures\keys\agent2-key.pem
npm ERR! fstream_path C:\Users\Administrator\AppData\Roaming\npm\node_modules\po
melo\node_modules\cliff\node_modules\winston\test\fixtures\keys\agent2-key.pem
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst
ream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: EPERM, unlink 'C:\Users\Administrator\AppData
\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\socket.i
o-client\dist\socket.io.min.js'
npm ERR! error rolling back  pomelo@1.1.2 { [Error: EPERM, unlink 'C:\Users\Admi
nistrator\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node
_modules\socket.io-client\dist\socket.io.min.js']
npm ERR! error rolling back   errno: 50,
npm ERR! error rolling back   code: 'EPERM',
npm ERR! error rolling back   path: 'C:\\Users\\Administrator\\AppData\\Roaming\
\npm\\node_modules\\pomelo\\node_modules\\pomelo-admin\\node_modules\\socket.io-
client\\dist\\socket.io.min.js' }
npm ERR! heapdump@0.2.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the heapdump@0.2.9 install script.
npm ERR! This is most likely a problem with the heapdump package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls heapdump
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "pomelo"
npm ERR! cwd C:\Users\Administrator
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR! Error: ENOENT, lstat 'C:\Users\Administrator\AppData\Roaming\npm\node_m
odules\pomelo\node_modules\pomelo-admin\node_modules\socket.io-client\dist\socke
t.io.min.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "pomelo"
npm ERR! cwd C:\Users\Administrator
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\pomelo\nod
e_modules\pomelo-admin\node_modules\socket.io-client\dist\socket.io.min.js
npm ERR! fstream_path C:\Users\Administrator\AppData\Roaming\npm\node_modules\po
melo\node_modules\pomelo-admin\node_modules\socket.io-client\dist\socket.io.min.
js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst
ream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/dequeue/1.0.3
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/async/0.1.15
npm http 304 https://registry.npmjs.org/dequeue/1.0.3
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/isarray/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Administrator\npm-debug.log
npm ERR! not ok code 0
ringa_lee
ringa_lee

ringa_lee

全員に返信(1)
巴扎黑

可能是因为没有找到npm这个目录,在你的C:\Users\Administrator\AppData\Roaming\手动新建一个npm的目录,我这边是因为在这个路径中有个名为npm的文件(不是目录),所以命令行不能正确识别。我是先把这个npm的文件重名为npm.bak(做一个备份)然后在新建一个npm的目录(不重命名的话提示提示目录已存在,其实就是那个npm的文件,应该自动生成而又没有被正确识别为目录)

我也是因为类似的问题Google到这里来的,是用npm install安装依赖的时候提示:
C:\Users\HuangKai>npm install -g less
Error: EEXIST, mkdir 'C:\Users\HuangKai\AppData\Roaming\npm'

いいねを押す +0
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート