簡體   English   中英

無效的平台x64在Windows x64上安裝節點畫布嗎?

[英]Invalid platform x64 installing node-canvas on windows x64?

我在運行Windows 7 64位的Windows機器上安裝節點畫布時遇到問題。 我已經按照說明進行操作,並且我還使用Visual C ++ Professional(試用版)進行了嘗試,但這也沒有幫助。

當我鍵入npm install canvas它將為我提供以下信息:

npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas
npm http GET https://registry.npmjs.org/canvas/-/canvas-0.13.1.tgz
npm http 200 https://registry.npmjs.org/canvas/-/canvas-0.13.1.tgz

>canvas@0.13.1 install C:\wamp\www\node_modules\canvas
>node-gyp rebuild

C:\wamp\www\node_modules\canvas>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
canvas@0.13.1 install C:\wamp\www\node_modules\canvas
> node-gyp rebuild


C:\wamp\www\node_modules\canvas>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" 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\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platform for project 'canvas.vcxproj' is invalid.  Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Platform that doesn't exist for this project. [C:\wamp\www\node_modules\canvas\build\canvas.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:232:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child:process.js:678:10)
gyp ERR! Syste, Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\wamp\www\node_modules\canvas
gyp ERR! node -v v0.8.16
gyp ERR! node-gyp -v v0.7.3
gyp ERR! not ok
canvas@0.13.1 node_modules\canvas

(我希望我正確鍵入控制台輸出,因為我不得不在控制台之外鍵入它,因為找不到日志,並且Windows顯然不允許您將完整的cmd輸出記錄到文件中)

我可以通過將兩個Express版本的VS2010替換為VS2010來解決相同的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM