今天在部署的时候始终无法成功,持续报错。貌似是系统问题,下面是报错:

> nodejieba@1.4.10 install /home/leanengine/app/node_modules/limax/node_modules/pinyin/node_modules/nodejieba > node-gyp rebuild make: Entering directory `/home/leanengine/app/node_modules/limax/node_modules/pinyin/node_modules/nodejieba/build' CXX(target) Release/obj.target/nodejieba/lib/index.o CXX(target) Release/obj.target/nodejieba/lib/nodejieba.o SOLINK_MODULE(target) Release/obj.target/nodejieba.node COPY Release/nodejieba.node make: Leaving directory `/home/leanengine/app/node_modules/limax/node_modules/pinyin/node_modules/nodejieba/build' npm ERR! Linux 4.4.0-21-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production" "--registry=http://registry.npm.taobao.org" "--disturl=https://npm.taobao.org/dist" npm ERR! node v4.4.3 npm ERR! npm v2.15.1 npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.0.12 npm ERR! notsup Valid OS: darwin npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: linux npm ERR! notsup Actual Arch: x64 npm ERR! Please include the following file with any support request: npm ERR! /home/leanengine/app/npm-debug.log Removing intermediate container 51a5bb91b787

npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production" "--registry=http://registry.npm.taobao.org" "--disturl=https://npm.taobao.org/dist"
npm ERR! node v4.4.3
npm ERR! npm  v2.15.1
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

似乎是在安装 fsevents 过程中出现的错误,这个包似乎只支持 Mac OS, 不能在 Linux 上安装。

感谢帮助,确实是这个问题,已经解决。

这是由 npm 3 的 shrinkwrap 造成的。在 npm3 里,shrinkwrap 没有区分跨平台兼容,具体的情况在这个地址:点击了解10

我简单粗暴的直接删了 shrinkwrap 部署, 直接成功。谢谢

1 人赞了这个帖子.