Я пытаюсь бежать npm install -g
команда проекта, основанная на файле node.js.
с использованием Windows и Visual Studio компилятор
я установил версию 2012/2013/2015
каждый раз, когда я запускаю команду npm в: Командная строка разработчика для VS2012 / 2013/2015
но я продолжаю получать эту ошибку (часть этого):
npm http 200 https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/semver/-/semver-1.1.4.tgz
npm http 200 https://registry.npmjs.org/semver/-/semver-1.1.4.tgz
npm http GET https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
npm http GET https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz
npm http GET https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz
C:\Users\foo.DM-IMCS\.node-gyp\0.10.13\deps\v8\include\v8.h(184): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\foo.DM-
IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws\build\binding.sln]
npm http 200 https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
npm http 200 https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz
npm http 200 https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz
LINK : fatal error LNK1181: cannot open input file 'C:\Users\foo.DM-IMCS\.node-gyp\0.10.13\\node.lib' [C:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws\build\bind
ing.sln]
Project : warning PRJ0018: The following environment variables were not found: [C:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws\build\binding.sln]
npm http GET https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/dequeue/1.0.3
npm http GET https://registry.npmjs.org/semver/-/semver-1.1.4.tgz
npm http 200 https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/async/-/async-0.1.15.tgz
npm http 200 https://registry.npmjs.org/semver/-/semver-1.1.4.tgz
C:\Users\foo.DM-IMCS\.node-gyp\0.10.13\deps\v8\include\v8.h(184): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\foo.DM-
IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws\build\binding.sln]
npm http 200 https://registry.npmjs.org/dequeue/1.0.3
npm http GET https://registry.npmjs.org/dequeue/-/dequeue-1.0.3.tgz
LINK : fatal error LNK1181: cannot open input file 'C:\Users\foo.DM-IMCS\.node-gyp\0.10.13\\node.lib' [C:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws\build\bind
ing.sln]
Project : warning PRJ0018: The following environment variables were not found: [C:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws\build\binding.sln]
npm http 200 https://registry.npmjs.org/async/-/async-0.1.15.tgz
npm http 200 https://registry.npmjs.org/dequeue/-/dequeue-1.0.3.tgz
npm http GET https://registry.npmjs.org/log4js
> [email protected] install C:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\heapdump
> node-gyp rebuildC:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\heapdump>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_mo
dules\node-gyp\bin\node-gyp.js" rebuild
npm http GET https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz
npm http 200 https://registry.npmjs.org/log4js
npm http GET https://registry.npmjs.org/log4js/-/log4js-0.6.27.tgz
npm http 200 https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz
npm http 200 https://registry.npmjs.org/log4js/-/log4js-0.6.27.tgz
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 200 https://registry.npmjs.org/uglify-js/1.2.5
npm http 200 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http GET https://registry.npmjs.org/underscore/1.8.2
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/semver/-/semver-4.3.6.tgz
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
C:\Users\foo.DM-IMCS\.node-gyp\0.10.13\deps\v8\include\v8.h(214): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\foo.DM-
IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\heapdump\build\binding.sln]
LINK : fatal error LNK1181: cannot open input file 'C:\Users\foo.DM-IMCS\.node-gyp\0.10.13\\node.lib' [C:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\
node_modules\heapdump\build\binding.sln]
Project : warning PRJ0018: The following environment variables were not found: [C:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\heapdump\bui
ld\binding.sln]
npm http 304 https://registry.npmjs.org/readable-stream
gyp npmERR! httpbuild error
200 https://registry.npmjs.org/underscore/1.8.2
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"gyp ERR! cwd C:\Users\foo.DM-IMCS\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\node_modules\heapdump
gyp ERR! node -v v0.10.13
gyp ERR! node-gyp -v v0.10.2
gyp ERR! not ok
npm http GET https://registry.npmjs.org/underscore/-/underscore-1.8.2.tgz
unbuild [email protected]
unbuild [email protected]
npm http 200 https://registry.npmjs.org/semver/-/semver-4.3.6.tgz
unbuild [email protected]
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm ERR! weird error 1
npm http 200 https://registry.npmjs.org/underscore/-/underscore-1.8.2.tgz
unbuild [email protected]
unbuild [email protected]
unbuild [email protected]
unbuild [email protected]
npm http GET https://registry.npmjs.org/zeparser/0.0.5
что не так с этой командой gyp?
После выполнения: npm install -g npm
и обновление до последней версии node.js
я получаю новый набор ошибок, когда я пытаюсь запустить в оболочке DOS, после выполнения:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
Все еще получаю ошибки:
G:\dev\cpp\Game_servers\pomelo\pomelo>npm cache clean
G:\dev\cpp\Game_servers\pomelo\pomelo>npm install -g
C:\Users\foo.FOO\AppData\Roaming\npm\pomelo -> C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\bin\pomelo
> [email protected] install C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\node_modules\heapdump
> node-gyp rebuildC:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\node_modules\heapdump>if not defined npm_config_node_gyp (node "C:\Users\foo.FOO\AppData\Roaming\npm\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.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using t
he v140 build tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selec
ting "Upgrade Solution...". [C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\node_modules\heapdump\build\addon.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\foo.FOO\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"gyp ERR! cwd C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\node_modules\heapdump
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
> [email protected] install C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-b
in\\..\..\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.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using t
he v140 build tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selec
ting "Upgrade Solution...". [C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws\build\bufferutil.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using t
he v140 build tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selec
ting "Upgrade Solution...". [C:\Users\foo.FOO\AppData\Roaming\npm\node_modules\pomelo\node_modules\ws\build\validation.vcxproj]
C:\Users\foo.FOO\AppData\Roaming\npm
└── (empty)
npm ERR! code 1
РЕШЕНИЕ !!
npm должен работать так:
npm install -d --msvs_version=2013
Задача ещё не решена.
Других решений пока нет …