简体   繁体   中英

I am running nodejs on windows 7 and I get below errors in the console when installing node modules (mongodb driver, mongoose etc)

Guess this has something to do something with MS visual studio, or may be not.

C:\\user_management>npm install 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)

Any suggestions on this, much appreciated!

The answer is here , only you need set environment variable VCTargetsPath to correct folder for file Microsoft.Cpp.Default.props me is here C:\\Program Files (x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\V120. Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM