运行npm install

时间:2018-03-16 18:30:51

标签: npm msbuild node-gyp node-fibers

有很多与此主题相关的问题,但是我尝试了以下所有解决方案都无济于事:

npm install -g --production windows-build-tools /*and*/ npm config set msvs_version 2015

安装Visual Studio Build Tools(8.1和10 sdks)

设置VCTargetsPath =“C:\ Program Files(x86)\ MSBuild \ Microsoft.Cpp \ v4.0 \(v110,v120,v140)”

几乎任何其他互联网解决方案。我的错误是:

PS C:\Users\hawki\idle-api> npm install

> fibers@1.0.15 install C:\Users\hawki\idle-api\node_modules\synchronize\node_modules\fibers
> node build.js || nodejs build.js


C:\Users\hawki\idle-api\node_modules\synchronize\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Users\hawki\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )  else (node "C:\Users\hawki\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\hawki\idle-api\node_modules\synchronize\node_modules\fibers\build\fibers.vcxpr
oj(20,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft
.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the
 <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\hawki\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258: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.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\hawki\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Users\hawki\idle-api\node_modules\synchronize\node_modules\fibers
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
npm WARN rollback Rolling back ajv@4.11.8 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\hawki\idle-api\node_modules\nodemon\node_modules\fsevents\node_modules'npm WARN idleapi@1.0.0 No description
npm WARN idleapi@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\nodemon\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers@1.0.15 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers@1.0.15 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\hawki\AppData\Roaming\npm-cache\_logs\2018-03-16T18_05_11_310Z-debug.log

我在Visual Studio Code中运行它,我认为问题是在我下载Visual Studio 2017之后开始的。我认为它应该在我的注册表中解决,但我已经尝试了Why does MSBuild look in C:\ for Microsoft.Cpp.Default.props instead of c:\Program Files (x86)\MSBuild? ( error MSB4019)中找到的解决方案而没有任何问题似乎工作,甚至改变原来的错误。如果有人可以指导我完成修复此操作的步骤,那将非常感激

0 个答案:

没有答案