错误:`C:程序文件(X86)Microsoft Visual Studio2017BuildToolsMSBuild15.0BinMSBuild.exe`失败,退出代码:1 [英] Error: `C:Program Files (x86)Microsoft Visual Studio2017BuildToolsMSBuild15.0BinMSBuild.exe` failed with exit code: 1

查看:14
本文介绍了错误:`C:程序文件(X86)Microsoft Visual Studio2017BuildToolsMSBuild15.0BinMSBuild.exe`失败,退出代码:1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用npm install命令安装所有依赖项,但在安装它时遇到如下错误:

ling source file ..src	hreaded_callback_invokation.cc)
c:applatestapplatest
ode_modules
an
an.h(1478): warning C4996: 'node::MakeCallback': was declared deprecated (comp
iling source file ..src	hreaded_callback_invokation.cc) [C:appLatestappLatest
ode_modulesvoicemeeter
ode_modules
ffiuildffi_bindings.vcxproj]
  c:usersalliancetek.node-gyp10.15.0include
ode
ode.h(176): note: see declaration of 'node::MakeCallback' (compi
  ling source file ..src	hreaded_callback_invokation.cc)
gyp ERR! build error
gyp ERR! stack Error: `C:Program Files (x86)Microsoft Visual Studio2017BuildToolsMSBuild15.0BinMSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:Program Files
odejs
ode_modules
pm
ode_modules
ode-gyplibuild.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:appLatestappLatest
ode_modulesvoicemeeter
ode_modulesffi
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@1.3.1 (node_modules7zip-bin-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-linux@1.3.1: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@1.0.1 (node_modules7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modulesfsevents):
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! ffi@2.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ffi@2.2.0 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:UsersalliancetekAppDataRoaming
pm-cache\_logs2019-02-05T10_40_31_378Z-debug.log

在许多解决方案中,我得到了尝试npm install node-gyp或卸载或再次安装它,但在这些解决方案中,我收到了相同的错误。

还可以尝试以下步骤:

  • 安装最新版本的PYTHON(可能与😅无关)、《Microsoft Visual C++ReDistributable for Visual Studio2017》,当然还有Node.js和npm;
  • 作为管理员: $CD"C:程序文件 Odejs ODE_MODULES 下午1:00-2:00 $npm安装节点-gyp
  • $NPM配置集MSVS_Version 2015--global 请注意,我有VS 2017,但将其配置为V2017不起作用。不知道为什么。
  • 作为管理员: $npm安装-g节点-sass 最后,最后一次检查: $node-sass-v

并尝试npm install --production windows-build-tools,但任何选项均未获得任何结果。

尝试了所有解决方案,但没有一种有效。我已经安装了带有2.7.15、vc++构建工具、VisualStudio2017和所有必需组件的Python。

我正在寻找过去两周的解决方案,请给我正确的答案

推荐答案

  1. 运行:npm cache clean --force
  2. 删除NODE_MODULES
  3. 删除Packagelock.json和ya n.lock(如果有)
  4. 运行:npm install

这篇关于错误:`C:程序文件(X86)Microsoft Visual Studio2017BuildToolsMSBuild15.0BinMSBuild.exe`失败,退出代码:1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆