在Node js上运行量angular器时出错

这里是我运行下面的命令时看到的git-shell日志信息。

npm run protractor 

 > angular-phonecat@0.0.0 preprotractor C:\Users\user\Documents\GitHub\angular-phonecat > npm run update-webdriver > angular-phonecat@0.0.0 preupdate-webdriver C:\Users\user\Documents\GitHub\angular-phonecat > npm install > bufferutil@1.1.0 install C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil > node-gyp rebuild C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. bufferutil.cc C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)' : function template has already been defined [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(256) : see declaration of '_NanEnsureLocal' C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(661): error C2039: 'FreeCallback' : is not a member of 'node' [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(661): error C2061: syntax error : identifier 'FreeCallback' [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(665): error C2065: 'callback' : undeclared identifier [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(665): error C2065: 'hint' : undeclared identifier [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(672): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\user\.node-gyp\5.5.0\include\node\node_buffer.h(43): could be 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,char *,size_t)' C:\Users\user\.node-gyp\5.5.0\include\node\node_buffer.h(31): or 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)' while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)' C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(676): error C2664: 'v8::Local<v8::Object>::Local(const v8::Local<v8::Object> &)' : cannot convert argument 1 from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] Reason: cannot convert from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object>' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(683): error C2039: 'Use' : is not a member of 'node::Buffer' [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\node_modules\nan\nan.h(683): error C3861: 'Use': identifier not found [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\bufferutil\build\bufferutil.vcxproj] > utf-8-validate@1.1.0 install C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate > node-gyp rebuild C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. validation.cc C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)' : function template has already been defined [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(256) : see declaration of '_NanEnsureLocal' C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(661): error C2039: 'FreeCallback' : is not a member of 'node' [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(661): error C2061: syntax error : identifier 'FreeCallback' [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(665): error C2065: 'callback' : undeclared identifier [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(665): error C2065: 'hint' : undeclared identifier [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(672): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] C:\Users\user\.node-gyp\5.5.0\include\node\node_buffer.h(43): could be 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,char *,size_t)' C:\Users\user\.node-gyp\5.5.0\include\node\node_buffer.h(31): or 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)' while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)' C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(676): error C2664: 'v8::Local<v8::Object>::Local(const v8::Local<v8::Object> &)' : cannot convert argument 1 from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] Reason: cannot convert from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object>' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(683): error C2039: 'Use' : is not a member of 'node::Buffer' [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\node_modules\nan\nan.h(683): error C3861: 'Use': identifier not found [C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\utf-8-validate\build\validation.vcxproj] > angular-phonecat@0.0.0 postinstall C:\Users\user\Documents\GitHub\angular-phonecat > bower install > angular-phonecat@0.0.0 update-webdriver C:\Users\user\Documents\GitHub\angular-phonecat > webdriver-manager update selenium standalone is up to date. chromedriver is up to date. C:\Users\user\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\chromedriver_2.20.zip C:\Users\user\AppData\Roaming\npm\node_modules\webdriver-manager\selenium The following files were installed: C:\Users\user\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\selenium-server-standalone-2.48.2.jar C:\Users\user\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\chromedriver > angular-phonecat@0.0.0 protractor C:\Users\user\Documents\GitHub\angular-phonecat > protractor test/protractor-conf.js 

在下面find详细的npmdebugging日志。

 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'protractor' ] 2 info using npm@3.3.12 3 info using node@v5.5.0 4 verbose run-script [ 'preprotractor', 'protractor', 'postprotractor' ] 5 info lifecycle angular-phonecat@0.0.0~preprotractor: angular-phonecat@0.0.0 6 verbose lifecycle angular-phonecat@0.0.0~preprotractor: unsafe-perm in lifecycle true 7 verbose lifecycle angular-phonecat@0.0.0~preprotractor: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\.bin;C:\Users\user\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\cmd;C:\Users\user\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin;C:\Users\user\AppData\Local\Apps\2.0\BWCNY8XR.ZG6\TLQ1VTOR.NWE\gith..tion_317444273a93ac29_0002.000e_114545a4195e25d4;C:\Users\user\AppData\Local\GitHub\lfs-amd64_0.5.1;C:\Program Files (x86)\MSBuild\12.0\bin;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\nodejs\;C:\Users\user\AppData\Roaming\npm;C:\Program Files (x86)\Skype\Phone\;C:\Users\user\AppData\Roaming\npm 8 verbose lifecycle angular-phonecat@0.0.0~preprotractor: CWD: C:\Users\user\Documents\GitHub\angular-phonecat 9 silly lifecycle angular-phonecat@0.0.0~preprotractor: Args: [ '/d /s /c', 'npm run update-webdriver' ] 10 silly lifecycle angular-phonecat@0.0.0~preprotractor: Returned: code: 0 signal: null 11 info lifecycle angular-phonecat@0.0.0~protractor: angular-phonecat@0.0.0 12 verbose lifecycle angular-phonecat@0.0.0~protractor: unsafe-perm in lifecycle true 13 verbose lifecycle angular-phonecat@0.0.0~protractor: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\user\Documents\GitHub\angular-phonecat\node_modules\.bin;C:\Users\user\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\cmd;C:\Users\user\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin;C:\Users\user\AppData\Local\Apps\2.0\BWCNY8XR.ZG6\TLQ1VTOR.NWE\gith..tion_317444273a93ac29_0002.000e_114545a4195e25d4;C:\Users\user\AppData\Local\GitHub\lfs-amd64_0.5.1;C:\Program Files (x86)\MSBuild\12.0\bin;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\nodejs\;C:\Users\user\AppData\Roaming\npm;C:\Program Files (x86)\Skype\Phone\;C:\Users\user\AppData\Roaming\npm 14 verbose lifecycle angular-phonecat@0.0.0~protractor: CWD: C:\Users\user\Documents\GitHub\angular-phonecat 15 silly lifecycle angular-phonecat@0.0.0~protractor: Args: [ '/d /s /c', 'protractor test/protractor-conf.js' ] 16 silly lifecycle angular-phonecat@0.0.0~protractor: Returned: code: 1 signal: null 17 info lifecycle angular-phonecat@0.0.0~protractor: Failed to exec protractor script 18 verbose stack Error: angular-phonecat@0.0.0 protractor: `protractor test/protractor-conf.js` 18 verbose stack Exit status 1 18 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:232:16) 18 verbose stack at emitTwo (events.js:100:13) 18 verbose stack at EventEmitter.emit (events.js:185:7) 18 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) 18 verbose stack at emitTwo (events.js:100:13) 18 verbose stack at ChildProcess.emit (events.js:185:7) 18 verbose stack at maybeClose (internal/child_process.js:821:16) 18 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 19 verbose pkgid angular-phonecat@0.0.0 20 verbose cwd C:\Users\user\Documents\GitHub\angular-phonecat 21 error Windows_NT 6.3.9600 22 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "protractor" 23 error node v5.5.0 24 error npm v3.3.12 25 error code ELIFECYCLE 26 error angular-phonecat@0.0.0 protractor: `protractor test/protractor-conf.js` 26 error Exit status 1 27 error Failed at the angular-phonecat@0.0.0 protractor script 'protractor test/protractor-conf.js'. 27 error Make sure you have the latest version of node.js and npm installed. 27 error If you do, this is most likely a problem with the angular-phonecat package, 27 error not with npm itself. 27 error Tell the author that this fails on your system: 27 error protractor test/protractor-conf.js 27 error You can get their info via: 27 error npm owner ls angular-phonecat 27 error There is likely additional logging output above. 28 verbose exit [ 1, true ]