[英]I am running nodejs on windows 7 and I get below errors in the console when installing node modules (mongodb driver, mongoose etc)
猜猜這與MS Visual Studio有什么關系,也許沒有。
C:\\ user_management> npm安裝mongodb
> kerberos@0.0.12 install C:\user_management\node_modules\mongodb\node_modules\m
ongodb-core\node_modules\kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\user_management\node_modules\mongodb\node_modules\mongodb-core\node_modules\k
erberos>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\n
ode_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:\user_management\node_modules\mongodb\node_modules\mongodb-core\node_modules\
kerberos\build\kerberos.vcxproj(18,3): error MSB4019: The imported project "C:\
Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Impor
t> declaration is correct, and that the file exists on disk.
mongodb@2.0.39 node_modules\mongodb<br>
├── readable-stream@1.0.31 (isarray@0.0.1, inherits@2.0.1, core-util-is@1.0.1, s
tring_decoder@0.10.31)<br>
├── es6-promise@2.1.1<br>
└── mongodb-core@1.2.6 (bson@0.4.8, kerberos@0.0.12)
任何建議,不勝感激!
答案是在這里 ,只有您需要設置環境變量VCTargetsPath來更正文件Microsoft.Cpp.Default.props的文件夾,這里是C:\\ Program Files(x86)\\ MSBuild \\ Microsoft.Cpp \\ v4.0 \\ V120。 祝好運!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.