2015-11-15 5 views
17

私はWindows 8.1を使用しています。私はVisual Studio 2015コミュニティ版をインストールしました。 npm install -g generator-keystoneを実行すると、一番下にエラーが表示されます。私は次のコマンドを実行しようとしましたが、私はまだ同じ結果を得ています。エラーTRK0005: "CL.exe"を見つけられません

set GYP_MSVS_VERSION=2015 
npm config set msvs_version 2015 --global 


C:\Users\user\AppData\Roaming\npm\node_modules\generator-keystone\node_modules\buffertools>if not defined npm_config_no 
de_gyp (node "C:\Users\user\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\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not fi 
nd WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versio 
n number. [C:\Users\user\AppData\Roaming\npm\node_modules\generator-keystone\node_modules\buffertools\build\buffertool 
s.vcxproj] 
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\user\AppData 
\Roaming\npm\node_modules\generator-keystone\node_modules\buffertools\build\buffertools.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:\Users\user\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.3.9600 
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm 
\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Users\user\AppData\Roaming\npm\node_modules\generator-keystone\node_modules\buffertools 
gyp ERR! node -v v4.2.2 
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 
C:\Users\user\AppData\Roaming\npm 
├── [email protected] 
└── UNMET PEER DEPENDENCY [email protected]>=1.0.0 

答えて

56

私はVisual Studioに入り、いくつかのライブラリをインストールしたVisual C++プロジェクトを作成しました。その後、npm installが動作しました。

+0

それはあなたのすべてですか?詳細はなく、まずC++プロジェクトを作成するだけですか? –

+1

@ JoshuaDannemann。短い答え:**はい**、デフォルトの選択されたオプションをインストールするには、[OK]をクリックします。新しいC++プロジェクトを作成すると、メインフレームには「余分なパッケージをインストールする」という2つのオプションが表示されます。そのパッケージは 'Visual C++ 2015用の共通ツール 'であり、Visual Studio 2015の設定ではデフォルトでは有効化されていない(ダウンロードされていない)コンパイラも含まれています。 Win8.1 SDK.Uもインストールしてください。http://go.microsoft.com/fwlink/?LinkId=691132 – erm3nda

+1

VS 2015のみをインストールしましたが、Webツールがインストールされていることを確認する必要がありました。コメントは私に戻って、Visual C++もインストールしていることを確認しました。私はnpmをnode-gypと一緒にインストールすることができました。:)その後、C++プロジェクトを作成する必要はありませんでした。 – Vixxd

関連する問題