2016-08-19 5 views
0

Я пытаюсь создать npm install проект, который был успешно создан в среде других разработчиков, но не работает на моем (окна 8.1).
Сперва я получил
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".
и попытался решить проблему, установив Visual C++ Build Tools 2015.
После этого я получил
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "14.0", "4.0".
и в соответствии с инструкциями на странице node-gyp, я скачал Option 1: Install Visual C++ Build Tools using the Default Install option, установить и запустить npm install --msvs_version=2015 и ниже, что он возвращается.
Реальный вопрос: если это фактическая ошибка кодирования или другая проблема с node-gyp и msvs_version, которые, как представляется, беспокоят многих пользователей Windows.
Пробовал несколько предложенных способов исправить ошибку node-gyp, но не удалось.Другая ошибка-node-gyp в окнах или фактическая ошибка кодирования?

D:\my_workspace\my_project\my_bundle\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. 
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" exited with code -1073741515. [D:\my_workspace\my_project\my_bundle\node_modules\bufferutil\build\bufferutil.vcxproj] 
gyp ERR! build error 
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\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276: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.3.9600 
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd D:\my_workspace\my_project\my_bundle\node_modules\bufferutil 
gyp ERR! node -v v4.5.0 
gyp ERR! node-gyp -v v3.4.0 
gyp ERR! not ok 

gyp ERR! Windows_NT 6.3.9600 
gyp ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--msvs_version=2015" 
gyp ERR! node v4.5.0 
gyp ERR! npm v2.15.9 
gyp ERR! code ELIFECYCLE 
gyp ERR! [email protected] install: `node-gyp rebuild` 
gyp ERR! Exit status 1 
gyp ERR! 
gyp ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
gyp ERR! This is most likely a problem with the bufferutil package, 
gyp ERR! not with npm itself. 
gyp ERR! Tell the author that this fails on your system: 
gyp ERR!  node-gyp rebuild 
gyp ERR! You can get information on how to open an issue for this project with: 
gyp ERR!  npm bugs bufferutil 
gyp ERR! Or if that isn't available, you can get their info via: 
gyp ERR! 
gyp ERR!  npm owner ls bufferutil 
gyp ERR! There is likely additional logging output above. 

gyp ERR! Please include the following file with any support request: 
gyp ERR!  D:\my_workspace\my_project\my_bundle\npm-debug.log 
+0

Вы должны имеют встроенные инструменты для некоторых модулей. Подробнее https://github.com/nodejs/node-gyp#installation –

+0

Я загрузил и установил 'Вариант 1: Установка Visual C++ Build Tools с использованием опции установки по умолчанию. ', А затем я получил эту ошибку. –

ответ

0

Установка из окна CMD в режиме администратора этого пакета:

НОЙ установки --global --production окно-сборку-инструментах

это cointans соответствующих версий C++ компилятор