首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误的旋转错误!堆栈错误:`C:\Program (x86)\MSBuild\14.0\bin\MSBuild.exe`失败,退出代码为1,而我的项目上正在执行节点

错误的旋转错误!堆栈错误:`C:\Program (x86)\MSBuild\14.0\bin\MSBuild.exe`失败,退出代码为1,而我的项目上正在执行节点
EN

Stack Overflow用户
提问于 2020-09-06 23:07:29
回答 2查看 2.8K关注 0票数 2

我试图在spring项目的根文件夹中执行命令: npm安装本机@1.1.6

问题是,每次执行命令时,无论我尝试什么,我都会得到一个错误(如下面所示的“错误-本机”)。

代码语言:javascript
运行
复制
C:\Users\USER1\git\projec-web>npm install natives@1.1.6
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.

> deasync@0.1.4 install C:\Users\USER1\git\projec-web\node_modules\deasync
> node ./build.js

C:\Users\USER1\git\projec-web\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
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".
  deasync.cc
  win_delay_load_hook.cc
c:\users\USER1\git\projec-web\node_modules\nan\nan_converters_43_inl.h(22): warning C4996: 'v8::Value::ToBoolean': was d
eclared deprecated (compiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\d
easync.vcxproj]
  C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(2665): note: see declaration of 'v8::Value::ToBo
  olean' (compiling source file ..\src\deasync.cc)
c:\users\USER1\git\projec-web\node_modules\nan\nan_converters_43_inl.h(40): warning C4996: 'v8::Value::BooleanValue': wa
s declared deprecated (compiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\buil
d\deasync.vcxproj]
  C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(2703): note: see declaration of 'v8::Value::Bool
  eanValue' (compiling source file ..\src\deasync.cc)
c:\users\USER1\git\projec-web\node_modules\nan\nan_implementation_12_inl.h(105): error C2664: 'v8::MaybeLocal<v8::Functi
on> v8::Function::New(v8::Local<v8::Context>,v8::FunctionCallback,v8::Local<v8::Value>,int,v8::ConstructorBehavior,v8::
SideEffectType)': cannot convert argument 1 from 'v8::Isolate *' to 'v8::Local<v8::Context>' (compiling source file ..\
src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]
  c:\users\USER1\git\projec-web\node_modules\nan\nan_implementation_12_inl.h(105): note: No constructor could take the s
  ource type, or constructor overload resolution was ambiguous (compiling source file ..\src\deasync.cc)

c:\users\USER1\git\projec-web\node_modules\nan\nan_implementation_12_inl.h(337): error C2660: 'v8::StringObject::New': f
unction does not take 1 arguments (compiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\
deasync\build\deasync.vcxproj]
c:\users\USER1\git\projec-web\node_modules\nan\nan_implementation_12_inl.h(337): error C2228: left of '.As' must have cl
ass/struct/union (compiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\dea
sync.vcxproj]
c:\users\USER1\git\projec-web\node_modules\nan\nan_implementation_12_inl.h(337): error C2059: syntax error: ')' (compili
ng source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]
C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1063): error C2661: 'v8::Value::ToString': no overloaded function t
akes 0 arguments (compiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\dea
sync.vcxproj]
C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1073): error C2664: 'int v8::String::WriteUtf8(v8::Isolate *,char *
,int,int *,int) const': cannot convert argument 1 from 'char *' to 'v8::Isolate *' (compiling source file ..\src\deasyn
c.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]
  C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1073): note: Types pointed to are unrelated; conversion requires
  reinterpret_cast, C-style cast or function-style cast (compiling source file ..\src\deasync.cc)
C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1847): warning C4996: 'v8::Object::Set': was declared deprecated (c
ompiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]
  C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(3499): note: see declaration of 'v8::Object::Set
  ' (compiling source file ..\src\deasync.cc)
C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1853): warning C4996: 'v8::Object::Set': was declared deprecated (c
ompiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]
  C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(3499): note: see declaration of 'v8::Object::Set
  ' (compiling source file ..\src\deasync.cc)
C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1859): warning C4996: 'v8::Object::Set': was declared deprecated (c
ompiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]
  C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(3508): note: see declaration of 'v8::Object::Set
  ' (compiling source file ..\src\deasync.cc)
C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1865): warning C4996: 'v8::Object::Get': was declared deprecated (c
ompiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]

C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(3553): note: see declaration of 'v8::Object::Get
  ' (compiling source file ..\src\deasync.cc)
C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1871): warning C4996: 'v8::Object::Get': was declared deprecated (c
ompiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]
  C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(3553): note: see declaration of 'v8::Object::Get
  ' (compiling source file ..\src\deasync.cc)
C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1876): warning C4996: 'v8::Object::Get': was declared deprecated (c
ompiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_modules\deasync\build\deasync.vcxproj]
  C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(3557): note: see declaration of 'v8::Object::Get
  ' (compiling source file ..\src\deasync.cc)
c:\users\USER1\git\projec-web\node_modules\nan\nan_object_wrap.h(24): error C2039: 'IsNearDeath': is not a member of 'Na
n::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\USER1\git\projec-web\node_modules\deasync\build\
deasync.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\deasync.cc)
  C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1888): note: see declaration of 'Nan::Persistent<v8::Object,v8::N
  onCopyablePersistentTraits<T>>'
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\deasync.cc)
c:\users\USER1\git\projec-web\node_modules\nan\nan_object_wrap.h(67): warning C4996: 'v8::PersistentBase<v8::Object>::Ma
rkIndependent': was declared deprecated (compiling source file ..\src\deasync.cc) [C:\Users\USER1\git\projec-web\node_mo
dules\deasync\build\deasync.vcxproj]
  C:\Users\USER1\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8.h(566): note: see declaration of 'v8::PersistentBa
  se<v8::Object>::MarkIndependent' (compiling source file ..\src\deasync.cc)
c:\users\USER1\git\projec-web\node_modules\nan\nan_object_wrap.h(124): error C2039: 'IsNearDeath': is not a member of 'N
an::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\USER1\git\projec-web\node_modules\deasync\build
\deasync.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\deasync.cc)
  C:\Users\USER1\git\projec-web\node_modules\nan\nan.h(1888): note: see declaration of 'Nan::Persistent<v8::Object,v8::N
  onCopyablePersistentTraits<T>>'
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\deasync.cc)

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:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\USER1\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\USER1\git\projec-web\node_modules\deasync
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok   


Build failed
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! deasync@0.1.4 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the deasync@0.1.4 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\USER1\AppData\Roaming\npm-cache\_logs\2020-09-06T07_52_53_788Z-debug.log

C:\Users\USER1\git\projec-web>

为了澄清一点,我需要在spring引导项目中执行这个命令,这样我就可以与后端java模块进行通信。这个项目叫做“project”,它是在节点版本1中编译的,遗憾的是,由于某些库的需求,我无法更改它。是否与我在项目根文件夹中执行npm或命令npm本机@1.1.6的问题有关?我注意到,当我执行这三个命令中的任何一个时,它都会给出相同的错误:

代码语言:javascript
运行
复制
- npm install natives@1.1.6
- npm install
- npm install -g @angular/cli 

我想做的是:

通过管理员权限执行以下命令: dependencies

  • execute administrator -全局--生产窗口--build-它成功地安装了,命令本机与上面详细描述的错误有关:administrator本地@1.1.6,这里我得到了我的错误。我一直在网上搜索,但是我找不到一个帮助我的解决方案。--

"C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js“I试图修复以下:节点重建

只有当我编辑包含本链接中解释的内容的binding.gpy文件时,这才能起作用:https://github.com/nodejs/node-gyp/issues/119还在src文件中添加binding.cc文件,这使我不得不执行重构命令。

我也试着遵循这个解决方案,但是它并没有帮助我,因为我最终都在上面写的同样的错误中。

我转到目录(C:\Users\USER1\AppData\Roaming\npm\node_modules\npm)并成功地执行了命令:Npm安装节点-gyp

之后我执行:npm配置集msvs_version 2015 -global

当我尝试执行以下命令时,我得到了上面详细描述的相同的错误:npm安装de异步

我的实际配置是:

代码语言:javascript
运行
复制
msvs_version = "2015"
python = "C:\\Users\\USER1\\.windows-build-tools\\python27\\python.exe"
prefix = "C:\\Users\\USER1\\AppData\\Roaming\\npm"
python version: 2.7.18
node version: v12.18.3
java version: "1.8.0_261"
my machine: windows 10 x64

请不要将此问题标记为重复,因为这是一个基于在proyect usigna分隔版本中部署节点依赖项的不同问题,此问题不在前面的问题中讨论。

我提供了我检查过但没有帮助我的流动链接:

Node-gyp. MSBuild.exe` failed with exit code: 1

gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1

Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe failed with exit code: 1

gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe

gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe

https://github.com/nodejs/node-gyp/issues/2033

https://github.com/nodejs/node-gyp/issues/1859

gulp - internalBinding is not defined

更新1我已经尝试做佩里钱MSFT告诉我,但我已经得到了同样的错误,我将尝试另一件事,我会告诉你的结果。

UPDATE 2我暂时做了一个演练来解决这个问题,但是我发现t know if this can be considered a solution. I’ve seen in this link ([Error:C:\Program (x86)\Microsoft Visual t know if this can be considered a solution. I’ve seen in this link ([Error:失败了,退出代码: 1](https://stackoverflow.com/questions/54532854/error-c-program-files-x86-microsoft-visual-studio-2017-buildtools-msbuild-1)),有些人尝试在节点版本中降级,我最初使用的是12版本,有些人说使用版本10应该可以。在此之后,我可以执行答案中提供的四个步骤:

运行:npm缓存干净-强制

代码语言:javascript
运行
复制
1. delete node_modules

2. delete packagelock.json and yarn.lock(if have)

3. run: npm install

首先,我需要降级我的节点版本,所以我遵循了这个文档(https://medium.com/appseed-io/how-to-run-multiple-versions-of-node-js-with-nvm-for-windows-ffbe5c7a2b47)

第一件事是在windows中安装nvm,所以请转到以下链接( https://github.com/coreybutler/nvm-windows/releases)并下载nvm-setup.zip文件,解压缩并执行它,然后按照安装步骤执行。然后安装version 10,使用以下命令: nvm 10.16.3之后,使用命令: nvm列表确保在您的计算机中启动了nvm的哪个版本(在我的示例中,返回了12.18.3版本(目前正在使用…)的两个结果)。以及10.16.3。使用命令更改到版本10 : nvm使用10.16.3

我遵循了这些步骤,但是为了让npm安装或npm本机@1.1.6命令恢复工作,我再次执行了命令npm @1.1.6,它给了我一些线索:

npm警告不要跳过可选依赖项:fsevents@1.2.4不受支持的平台:需要{“os”:“达尔文”,"arch":"any"} (当前:{"os":"win32",“x64”})

从21个贡献者中增加16个包,删除2个包,并在92.167 s中审计1949年的包

从技术上讲,这不是一个答案,因为版本12应该以与版本10相同的方式工作。为了提供一个真正的解决方案,我将在下周进一步研究。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-10-23 09:14:40

我在更新2中详细介绍了这个问题,但这基本上是我在这里解释的:我在这个链接中看到(错误:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe与退出代码一起失败: 1)有些人尝试在节点版本中降级,我最初使用的是版本12,有些人说版本10应该可以工作。在此之后,我可以执行答案中提供的四个步骤:

票数 1
EN

Stack Overflow用户

发布于 2022-08-04 20:15:55

对于我来说,一旦我将国家预防机制更新为最新版本,这个问题就解决了。

代码语言:javascript
运行
复制
npm install npm@latest -g
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63769647

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档