appcelerator 5.1.0 ws / bufferutil build error

时间:2016-01-28 08:21:02

标签: appcelerator appcelerator-cli

我今天尝试在Win7上安装appcelerator。我得到的是“Appcelerator CLI正在安装或升级,请稍等......”。

通过cli安装

npm install appcelerator -g

失败,输出如下。我尝试安装5.0.0并得到一个不同的错误消息。有什么想法吗?

Finding version 5.1.0 ... OK
Validating security checksum OK
Installing ... OK
Compiling platform native modules ...
└ extract-opts/typechecker ... OK
└ bunyan/dtrace-provider ...  OK
└ extract-opts/typechecker ...  OK
└ socket.io-client/ws ...  OK
└ appc-ldapjs/dtrace-provider ...  OK
└ bunyan/dtrace-provider ...  OK
└ appc-ldapjs/dtrace-provider ...  OK
└ ws/bufferutil ... gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
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:\Users\Drew\.appcelerator\install\5.1.0\package\node_modules\arro
w\node_modules\appc-pubsub\node_modules\socket.io-client\node_modules\engine.io-
client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "bufferutil@1.2.1" "--production"
npm ERR! node v5.5.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! bufferutil@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.2.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bufferutil 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 bufferutil
npm ERR! There is likely additional logging output above.

3 个答案:

答案 0 :(得分:1)

解决

我不得不卸载appcelerator和node.js.然后删除%APPDATA%npn和npn-cache。然后安装appcelerator。

如果在安装jre后安装jdk, appcelerator也不喜欢它。

答案 1 :(得分:0)

尝试卸载节点版本。打开Appcelerator Studio,它将自动安装节点版本。接下来使用命令提示符运行以下命令:

  • npm install appcelerator -g
  • appc使用最新的

希望这有帮助。

答案 2 :(得分:0)

请参阅https://www.robertkehoe.com/2015/03/fix-node-gyp-rebuild-error-on-windows/,这可能会有所帮助。 Windows和node / node-gyp是当前节点社区正在处理的当前挑战。