エラーgypERR!スタックエラー: `C:\ Program Files(x86)\ MSBuild \ 14.0 \ bin \ MSBuild.exe`が終了コード:1で失敗しましたが、プロジェクトでノードをインストールしていません

MrPotatoServer

Springプロジェクトのルートフォルダー内でコマンドを実行しようとしています:npm install [email protected]

問題は、コマンドを実行するたびに、何を試してもエラー(以下の「エラーネイティブ」に表示)が発生することです。

C:\Users\USER1\git\projec-web>npm install [email protected]
npm WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].

> [email protected] 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: [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 ./build.js`
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\USER1\AppData\Roaming\npm-cache\_logs\2020-09-06T07_52_53_788Z-debug.log

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

少し明確にするために、Spring Bootプロジェクト内でコマンドを実行して、AngularモジュールをバックエンドJavaモジュールと通信できるようにする必要があります。このプロジェクトは「project-web」と呼ばれ、ノードバージョン1でコンパイルされていますが、一部のライブラリの要件のため、残念ながら変更できません。プロジェクトのルートフォルダー内でnpminstallまたはコマンドnpminstall [email protected]を実行する問題と関係がありますか?これらの3つのコマンドのいずれかを実行すると、同じエラーが発生することに気付きました。

- npm install [email protected]
- npm install
- npm install -g @angular/cli 

私がやろうとしたことは:

  1. 管理者権限で次のコマンドを実行します。npminstall--global--productionwindows-build-tools依存関係を正常にインストールしました
  2. 上記のエラーでコマンドnativesを実行します:npm [email protected]ここでエラーが発生しました。私はインターネット全体を検索してきましたが、私を助ける解決策を見つけることができません。

次の問題修正しようとしました:ノード "C:\ Users \ USER1 \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ node-gyp \ bin \ node-gyp.js"再構築

これは、次のリンクで説明されている内容でbinding.gpyファイルを編集した場合にのみ機能します:https//github.com/nodejs/node-gyp/issues/119また、srcファイルにbinding.ccファイルを追加します。再構築コマンドを実行します。

私もこの解決策に従おうとしましたが、上記と同じエラーが発生したため、役に立ちませんでした。ここに画像の説明を入力してくださいディレクトリ(C:\ Users \ USER1 \ AppData \ Roaming \ npm \ node_modules \ npm)に移動し、次のコマンドを正常に実行しました:Npm install node-gyp

その後、次のように実行します。npmconfig set msvs_version 2015 –global

そして、次のコマンドを実行しようとすると、上記と同じエラーが発生します:npm install deasync

私の実際の構成は次のとおりです。

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 sepcificバージョン内でのノード依存関係のデプロイに基づく別の質問であるため、重複としてマークしないでください。この問題は、前の質問ではカバーされていません。

私はチェックしたが助けにはならなかった流れるようなリンクを提供します:

https://html.developreference.com/article/11494072/gyp+ERR!+stack+Error%3A+%60C%3A+Program+Files+(x86)+MSBuild+14.0+bin+msbuild.exe%60

Node-gyp。MSBuild.exe`が終了コードで失敗しました:1

gyp ERR!スタックエラー: `C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ BuildTools \ MSBuild \ 15.0 \ Bin \ MSBuild.exe`が終了コードで失敗しました:1

エラー: `C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ BuildTools \ MSBuild \ 15.0 \ Bin \ MSBuild.exe`が終了コードで失敗しました:1 gyp ERR!スタックエラー: `C:\ Program Files(x86)\ MSBuild \ 12.0 \ bin \ msbuild.exe`が終了コードで失敗しました:1

gyp ERR!スタックエラー: `C:\ Program Files(x86)\ MSBuild \ 14.0 \ bin \ msbuild.exe`

gyp ERR!スタックエラー: `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が定義されていません

更新1Perry Qian MSFTが教えてくれたことを実行しようとしましたが、同じエラーが発生しました。別のことを試して、結果をお知らせします。

UPDATE 2今のところ問題を解決するためにすべてのウォークアラウンドを行いましたが、これが解決策と見なされるかどうかはわかりません。このリンク(エラー: `C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ BuildTools \ MSBuild \ 15.0 \ Bin \ MSBuild.exe`が終了コード:1で失敗しました)で、一部の人がノードバージョンでのダウングレードでは、元々バージョン12を使用していましたが、バージョン10で動作するはずだと言う人もいます。その後、答えに示されている4つのステップを実行できます。

実行:npm cache clean --force

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ファイルをダウンロードし、解凍して実行し、次の手順に従ってください。インストール手順。次に、バージョン10をインストールし、次のコマンドを使用します。nvminstall 10.16.3その後、次のコマンドを使用して、マシンで起動されているnvmのバージョンを確認します。nvmlist(私の場合、バージョン12.18.3(現在使用している)の2つの結果が返されました。 …)および10.16.3。次のコマンドを使用してバージョン10に変更します。nvmuse10.16.3

手順に従いましたが、npminstallまたはnpminstall [email protected]コマンドを再び機能させるために、コマンドnpm install [email protected]再度実行すると、いくつかのトレースが得られました。

npm WARN notsupスキップオプションの依存関係:[email protected]でサポートされていないプラットフォーム:wanted {"os": "darwin"、 "arch": "any"}(現在:{"os": "win32"、 "arch": "x64"})

21人の寄稿者から16個のパッケージを追加し、2個のパッケージを削除し、92.167秒で1949個のパッケージを監査しました

技術的に言えば、バージョン12はバージョン10と同じように機能するはずなので、これは答えではありません。実際の解決策を提供するために、来週さらに調査します。

MrPotatoServer

この問題への私のウォークアラウンドはアップデート2で詳しく説明されていますが、基本的にはここで説明しました:このリンク(エラー:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe終了コード:1で失敗)で、ノードバージョンでダウングレードを試みた人がいることを確認しました。元々バージョン12を使用していて、バージョン10で動作するはずだという人もいます。その後、答えに示されている4つのステップを実行できます。

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

Related 関連記事

ホットタグ

アーカイブ