現在npmパッケージであるheatmapをインストールし、利用しようと思っております。
npm install したところ、node-canvasのコンパイル時(node-gyp rebuild
)にエラーが発生し、heatmapの依存ライブラリであるnode-canvasインストール段階で失敗してしまいます。
環境は
Windows 7
node 4.4.3
npm 2.15.1
npm canvasを参考にし、node-gyp、cairo、libjpeg-turboはインストールし、npm install canvas
ではインストールできました。
何かこの状況を解決する情報をお持ちであればお力添えいただければと思います。
よろしくお願いいたします。
なお、エラー情報は下記のようなものが複数回と
C:\Program Files\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\init.cc) [C:[prj-path]\node_modules\heatmap\node_modules\canvas\build\canvas.vcxproj]
以下のものが表示されます
gyp ERR! build error gyp ERR! stack Error: `C:\Program Files\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.1.7601 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:[prj-path]\node_modules\heatmap\node_modules\canvas gyp ERR! node -v v4.4.3 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "ins tall" "heatmap" npm ERR! node v4.4.3 npm ERR! npm v2.15.1 npm ERR! code ELIFECYCLE npm ERR! canvas@1.0.4 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the canvas@1.0.4 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the canvas 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 canvas npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls canvas npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:[prj-path]\npm-debug.log
あなたの回答
tips
プレビュー