|
|
报错信息:1 g' h3 }" H% J" {$ x
```bash9 G& @+ _' H% Y
gyp ERR! find VS
# q0 ~- d0 S ]gyp ERR! find VS msvs_version not set from command line or npm config7 v( l3 K" N: H5 n
gyp ERR! find VS running in VS Command Prompt, installation path is:
/ ` K: S+ r6 m1 M8 j1 i% zgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
! }) ^; u/ N' g: [6 Q/ o: cgyp ERR! find VS - will only use this version
6 n( z. E% C' {7 H' A0 G6 ~gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer) X2 r& @& h; o* }3 G5 a! _/ h9 h6 f* S$ W
gyp ERR! find VS looking for Visual Studio 2015
3 k) U6 Q6 |: v9 n tgyp ERR! find VS - not found9 S9 m" X' r1 K( C+ y
gyp ERR! find VS looking for Visual Studio 2013% T* [$ I/ S3 X* ~8 N: j
gyp ERR! find VS - not found7 }8 C9 H+ z W+ T# w- G
gyp ERR! find VS
* m& ` _7 j) d4 h; Q/ W$ j" [- tgyp ERR! find VS **************************************************************
, s1 B5 b t- h6 W) y, zgyp ERR! find VS You need to install the latest version of Visual Studio$ u3 ^' D! K, z
gyp ERR! find VS including the "Desktop development with C++" workload.4 y, ^* Q3 T. Y, ?; V8 s9 P
gyp ERR! find VS For more information consult the documentation at:
1 ]7 w2 X% s3 t* V0 F8 ]6 xgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows: M6 }$ [# g1 H
gyp ERR! find VS **************************************************************
3 d9 z5 O' o% f+ H, `5 igyp ERR! find VS8 j1 D* K; d0 a( [& W
gyp ERR! configure error
1 G. s* a. W: h6 N d9 I$ Igyp ERR! stack Error: Could not find any Visual Studio installation to use$ c( @8 f1 {- H {1 D
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu6 c0 k# C/ S/ w
dio.js:121:47)+ d; C+ y2 ^8 N
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
0 @4 |$ v, e7 t0 Z. ^. b( xgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16+ \5 b6 g. {# f- u! l2 ?
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7, w' }8 j3 z! A, o0 k% @
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16& c6 X% p. r2 _% _; y# \+ |* ?% p
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
- x, W! \2 ]% n+ igyp ERR! stack at ChildProcess.emit (events.js:315:20)" m; }9 d8 R8 O& @1 p) u5 G
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
$ p! ^$ I$ F! P5 m6 V) b. ~; Q: z4 F# Ogyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)+ m! z! d6 i4 K, X2 F
gyp ERR! System Windows_NT 10.0.15063 0 F! y* J& W( ] \
0 ^+ q" A: E7 B9 S, `% x4 o
解决办法
) [. [. B( I2 e3 z, C l1、卸载nodejs重新安装一遍) u, _2 R: a9 _0 {7 d/ L
. l3 m3 f* p. I1 S7 h2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
. }1 r, K( B: Q5 x+ r, T, w: u9 V
" d+ j9 u ^' h' d4 A. p9 u. D4 a3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools; U! ~7 ~% `5 c# |2 A$ k2 c% Q
————————————————
8 g5 o% D/ N4 d& Y2 c& d6 H+ Z版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
) X& o$ ]* h; n0 Q. |原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|