错误 MSB8007:项目 XXX 的平台无效。平台='x64'

error MSB8007: The Platform for project XXX is invalid. Platform='x64'

本文关键字:平台 项目 MSB8007 x64 错误 无效 XXX      更新时间:2023-10-16

我已经从32位笔记本电脑切换到64位笔记本电脑,我正在尝试npm install一个依赖于"swisseph": "0.5.6"node.js项目。

在32位以下,一切都很好,但现在已经不起作用了。我收到以下错误消息:

C:UsersjverstryngeDocumentsPrivateFree TimeChartVibes>npm install
|
> swisseph@0.5.6 install C:UsersjverstryngeDocumentsPrivateFree TimeChartVibesnode_modulesswisseph
> node-gyp rebuild

C:UsersjverstryngeDocumentsPrivateFree TimeChartVibesnode_modulesswisseph>if not defined npm_config_node_gyp (node "C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin\....node_modulesnode-gypbinnode-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)MSBuildMicrosoft.Cppv4.0Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platf
orm for project 'swissephz.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 proje
ct. [C:UsersjverstryngeDocumentsPrivateFree TimeChartVibesnode_modulesswissephbuilddepsswissephswissephz.vc
xproj]
gyp ERR! build error
gyp ERR! stack Error: `C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.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 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:UsersjverstryngeDocumentsPrivateFree TimeChartVibesnode_modulesswisseph
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
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"
npm ERR! node v4.2.3
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! swisseph@0.5.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the swisseph@0.5.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the swisseph 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 their info via:
npm ERR!     npm owner ls swisseph
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     C:UsersjverstryngeDocumentsPrivateFree TimeChartVibesnpm-debug.log

我安装了Microsoft Visual C++2010学习版。有人知道怎么解决这个问题吗?

要使用Visual C++2010学习版构建x64项目,请下载并安装Windows软件开发工具包7.1版

Visual C++2010学习版不包含64位编译器,但SDK包含。如果您仍然没有Visual C++2010的x64编译器,请阅读以下内容:http://support.microsoft.com/kb/2519277