error MSB4019: Not found the imported project "C:\Microsoft.Cpp.Default.props"

907 Views Asked by At

I am trying to execute the command npm install in a project and it gives me this error:

$ npm install

> [email protected] install C:\Users\irodriba\Documents\project\node_modules\node-expat
> node-gyp rebuild


C:\Users\irodriba\Documents\project\node_modules\node-expat>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
C:\Users\irodriba\Documents\project\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\libexpat\version.c
Los proyectos de esta solución se van a compilar de uno en uno. Para habilitar la compilación en paralelo, agregue el modificador "/m".
C:\Users\irodriba\Documents\project\node_modules\node-expat\build\deps\libexpat\expat.vcxproj(20,3): error MSB4019: No se encuentra el proyecto importado "C:\Microsoft.Cpp.Default.props". Asegúrese de que la ruta de acceso de la declaración <Import> es correcta y de que el archivo se encuentra en el disco.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\npm-lifecycle\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\irodriba\Documents\project\node_modules\node-expat
gyp ERR! node -v v8.16.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of eslint@^4.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint-plugin-import@^2.7.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package babel-preset-env is included as both a dev and production dependency.
npm WARN The package rimraf is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\irodriba\AppData\Roaming\npm-cache\_logs\2021-12-02T09_48_42_235Z-debug.log

I have installed the windows-build-tools 2015 and python 2.7. I set the msvs_version with this line:

npm config set msvs_version 2015

And i set the python path with this line:

npm config set python C:\Python27\python.exe
0

There are 0 best solutions below