gpt4 book ai didi

node.js - 错误 MSB007 node.js Mongoose

转载 作者:搜寻专家 更新时间:2023-11-01 00:18:44 25 4
gpt4 key购买 nike

我正在尝试在我的 nodeJS 项目上安装 Mongoose ,但出现此错误

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: The Platform for project 'kerberos.vcxproj' is i
.Targets(23,7): error MSB8007: The Platform for project 'bson.vcxproj' is inval
nvalid. Platform='x64'. You may be seeing this message because you are trying
id. Platform='x64'. You may be seeing this message because you are trying to b
to build a project without a solution file, and have specified a non-default Pl
uild a project without a solution file, and have specified a non-default Platfo
atform that doesn't exist for this project. [c:\testNodeMongoose\node_modules\m
rm that doesn't exist for this project. [c:\testNodeMongoose\node_modules\mongo
ongoose\node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
ose\node_modules\mongodb\node_modules\bson\build\bson.vcxproj]

但我已经安装了 Python 和 visual studio 2010 express 以及 Gyp。当我尝试安装 socket.io 时,我遇到了同样的问题......

最佳答案

VS Express 不支持 x64 构建,因此您在这里有几个选择:

  • 安装完整 Visual Studio 套件的试用版
  • 卸载 64 位 Node 并使用 x86 版本
  • 安装 Windows SDK

我个人推荐第二个(win32 Node ),因为 SDK 安装很麻烦(大多数情况下它会失败并且没有错误消息,这“可能”是“坏”vcredist 版本的标志),并且完整的 Visual Studio 并不便宜(虽然试用不是永久解决方案)。

关于node.js - 错误 MSB007 node.js Mongoose ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17640950/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com