|
|
报错信息:* c7 L2 c: y$ }
```bash
7 M* K4 I9 S, V& cgyp ERR! find VS& v* R5 C# G+ q+ X5 G" @
gyp ERR! find VS msvs_version not set from command line or npm config
$ s# T2 T3 e% [& kgyp ERR! find VS running in VS Command Prompt, installation path is:
$ J [7 h. \* ^; qgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"- c. t) y% O1 q* I. R
gyp ERR! find VS - will only use this version
# w0 C1 `" K R! i3 S7 D5 p; Fgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer4 Y; O1 F- f& q6 o1 ?+ H) t( n
gyp ERR! find VS looking for Visual Studio 2015
4 D* j7 ]! ?1 _7 w( f6 y( i7 P; Bgyp ERR! find VS - not found& d0 T- n* g S) E0 s; @
gyp ERR! find VS looking for Visual Studio 2013# i$ F, ?" `0 v6 E
gyp ERR! find VS - not found% D0 s/ d# C9 l. E& |
gyp ERR! find VS
# ^9 A# @# i! @ b2 L% h+ D$ Lgyp ERR! find VS **************************************************************9 x$ X9 f# d" O9 ^
gyp ERR! find VS You need to install the latest version of Visual Studio) ?9 G( k# O, D
gyp ERR! find VS including the "Desktop development with C++" workload.
( F0 n" S) b. _" R; |gyp ERR! find VS For more information consult the documentation at:
5 [& X. I1 D" ^1 ]7 d: X) Mgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
( q6 W( k3 ^$ A2 C/ q+ M0 Bgyp ERR! find VS **************************************************************) @3 i4 a5 |: j4 _4 e
gyp ERR! find VS
5 q! b" A6 b u5 d9 ^& D. egyp ERR! configure error
$ C) M: _8 S e* S4 jgyp ERR! stack Error: Could not find any Visual Studio installation to use
. P T' B, H& z& | Pgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
# n7 q8 r- [) E$ R; ?& l. d9 d6 Ldio.js:121:47)
+ o& m6 g0 o: E' h" k& } ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
( l2 G! j. `- o- @2 u1 f, R9 U$ n2 ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
" J+ x8 ?3 U* B. b5 _: }gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7& Y. Q) U4 ^- a6 y( H
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
0 R% I1 _. X+ Egyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)7 Z8 j3 o$ Q& d- P& C5 f1 R
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
# K: X/ h0 b% ]8 Q/ tgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)+ \6 J2 L. i, Q9 d: y5 \
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
4 T: n. d; Z9 g+ Q5 i4 P' E! k, Ogyp ERR! System Windows_NT 10.0.15063 9 T9 ~7 D3 G; y) g: a$ M
7 I9 ~0 k4 R! w解决办法
1 Z; Q" u/ t! y1 H5 [" A1、卸载nodejs重新安装一遍 p" d [4 U o+ s" W4 s% C
" L/ D) n$ y. A, i6 F1 z+ \& z4 B2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org. C( y8 M5 `: X* f; e/ U/ }
6 U& X( a- v, T7 D# E' V: x3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools- A0 N2 T* x4 W. }; m
————————————————8 K: B( ?# G8 ?; c1 [: G
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。# B& K3 f1 \$ f% z9 ]; ^, Q; S1 v
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|