Windows 7 64位上的phonegap安装错误

时间:2015-05-22 14:05:00

标签: cordova installation npm phonegap-build

我通过

安装phonegap时出现问题
npm install phonegap -g

我有很多以

为首的错误
bufferutil.cc
C:\Users\loppp\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(213): error C2039: “ThrowException”: no member named 'ThrowException' in 'v8::String';
[C:\Users\loppp\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj]

C:\Users\loppp\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(213): error C2039: no member named 'New' in 'v8::String';     
[C:\Users\loppp\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj]

C:\Users\loppp\.node-gyp\0.12.3\deps\v8\include\v8.h(1599) :see declaration of 'v8::String'

我被困在这里几个小时,有人可以帮助我吗?

ps,在npm install phonegap -g:

之后立即打印出版本信息
npm WARN engine cordova-js@3.9.0: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.3","npm":"2.9.1"})
npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.3","npm":"2.9.1"})
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.3","npm":"2.9.1"})

依赖关系:

"dependencies": {
"colors": "0.6.0-1",
"connect-phonegap": "0.16.0",
"cordova": "5.0.0",
"minimist": "0.1.0",
"phonegap-build": "0.9.1",
"pluralize": "0.0.4",
"prompt": "0.2.11",
"qrcode-terminal": "0.9.4",
"semver": "1.1.0",
"shelljs": "0.1.4"
},

1 个答案:

答案 0 :(得分:0)

今天就修好了。只需删除其他路径并保持系统和用户$ PATH简单:

C:\ python27_x64; C:\ Users \ USERNAME \ AppData \ Roaming \ npm; C:\ Program Files(x86)\ nodejs \; C:\ Users \ USERNAME < / strong> \ AppData \ Roaming \ Composer \ vendor \ bin