nodejsとnode-gypを使用するクローンプロジェクトに対してnpmをインストールしようとしています。バージョンミスマッチの問題が多く(特にVisual Studioの場合)、リビルド時にノード-Gypリビルドが失敗する箇所がありました。Windows 10でnpmのインストールが失敗する(node-gyp rebuild)
のPython 2.7、アンインストールVS2013をインストールして、Visual C++ 2015でVS2015 Communityエディションをインストールには、SET GYP_MSVS_VERSION=2015
を使用して2015
に環境変数GYP_MSVS_VERSION
を変更npm config set msvs_version 2015 --global
をした、npm install -g --msvs_version=2015
を実行し、次のエラーを得ました。私はこの時点でプロセスをさらに進め、5時間以上も試していませんでした!
私はCmder(管理者として実行中)、npm v3.6.0、ノードv5.7.0、ノード-gyp v3.3.1(node-gyp -v
の結果はv3.3.1
)を使用しています。
私はWindows 10 x64を使用しています。
これらのエラーの原因は何ですか?
..\src\WebWorkerThreads.cc(231): error C2660: 'v8::Isolate::New': function does not take 0 arguments [C:\Users \ramtin\AppData\Roaming\npm\node_modules\troop-node-enforcer\node_modules\webworker-threads\build\WebWorkerThr eads.vcxproj]
..\src\WebWorkerThreads.cc(540): warning C4996: 'node::FatalException': was declared deprecated [C:\Users\ramt in\AppData\Roaming\npm\node_modules\troop-node-enforcer\node_modules\webworker-threads\build\WebWorkerThreads. vcxproj]
C:\Users\ramtin\.node-gyp\5.7.0\include\node\node.h(282): note: see declaration of 'node::FatalException'
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:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
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 C:\Users\ramtin\AppData\Roaming\npm\node_modules\troop-node-enforcer\node_modules\webworker-threads
gyp ERR! node -v v5.7.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
C:\Users\ramtin\AppData\Roaming\npm
`-- (empty)
npm WARN optional Skipping failed optional dependency /troop-node-enforcer/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "--msvs_version=2015"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 webworker-threads 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 information on how to open an issue for this project with:
npm ERR! npm bugs webworker-threads
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls webworker-threads
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\ramtin\trooptraining\troop\troop-node-enforcer\npm-debug.log
npm ERR! code 1
ストーリーが長いです:https://github.com/npm/npm/issues/10768 –
@RomanDibikhinこれはこの問題とは関係ありません。 – mscdex