我以管理权限启动CMD,然后执行以下操作:npm install -g ccap

但我得到一个错误:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: The Platform for project 'hcaptha.vcxproj' is in
valid.  Platform='x64'. You may be seeing this message because you are trying t
o build a project without a solution file, and have specified a non-default Pla
tform that doesn't exist for this project. [C:\Users\adam\AppData\Roaming\npm\n
ode_modules\ccap\build\hcaptha.vcxproj]

最佳答案

找到了一个新的,更有可能的原因。 gyp节点和Windows x64存在一些兼容性问题。检查node-gyp和node的版本,然后尝试更新。看到此:https://github.com/voodootikigod/node-serialport/issues/90#issuecomment-8964116

关于node.js - 无法在Windows 7上安装ccap(nodejs库),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/18240354/

10-12 01:24