|
|
报错信息:0 U1 p' D4 k5 a. G8 H5 l
```bash
8 E% W: n- ~, U# `4 B5 fgyp ERR! find VS9 E" ~- h2 j$ i4 h) A2 O
gyp ERR! find VS msvs_version not set from command line or npm config
* J/ s3 @4 v$ b, A3 jgyp ERR! find VS running in VS Command Prompt, installation path is:
; g" V& R0 x) c" m, ^gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
7 V$ U9 G `# [gyp ERR! find VS - will only use this version
8 q! i; M- Q0 n& {9 c/ w; r) Dgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
* G; @, T3 [9 Y9 f% k$ Agyp ERR! find VS looking for Visual Studio 2015* o3 a; o2 u# \# G! B1 A
gyp ERR! find VS - not found
: Z; N' ^, [8 s% ~1 Pgyp ERR! find VS looking for Visual Studio 2013
* ^0 c6 D/ ^( c/ Wgyp ERR! find VS - not found
) N9 P& f e4 o/ Tgyp ERR! find VS" a: x0 B; `3 x) e! l+ H
gyp ERR! find VS **************************************************************8 u/ n' B. d _6 A7 `; S2 I
gyp ERR! find VS You need to install the latest version of Visual Studio
4 \6 n- h" H" V, e; N' }gyp ERR! find VS including the "Desktop development with C++" workload.
2 \0 G8 z. A8 |# l9 k" ogyp ERR! find VS For more information consult the documentation at:
3 Q1 W* l$ U# g8 o r# Zgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
) G) q$ p! e4 H/ x" k3 O6 [gyp ERR! find VS **************************************************************
& a# n" F' D1 C; w0 ?# Y. v; Vgyp ERR! find VS
5 B1 X) y. I; e8 j& `) d; rgyp ERR! configure error
% d+ A% _/ d) l: @- agyp ERR! stack Error: Could not find any Visual Studio installation to use5 N0 M0 s1 p/ R; e
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
# ? `. P% | B1 o' Z# X& w, Bdio.js:121:47)
0 t% i. U: S' Bgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
; J: C8 D3 y" t% p0 c* egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16) v/ q6 V0 J5 U) b- B7 y
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7% O; z9 x, v: f
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16) T1 ^, J5 U9 `( i: X
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)# i( d* _- v! g( s: N9 A
gyp ERR! stack at ChildProcess.emit (events.js:315:20)% `- A7 ^7 P+ p! H
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
B! A1 j- B% |) M# Xgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
1 X& A: h" ~+ M: w# B+ g3 h9 h# Ogyp ERR! System Windows_NT 10.0.15063 , l6 a% [5 L7 c' W: ?' i2 q( e0 I
6 ]5 s; E) D* v: V
解决办法8 W u7 _% c" n
1、卸载nodejs重新安装一遍# | E/ r- v1 Q, |0 {
8 y7 H. J& E! b& k2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org' G* y6 I$ Y/ q" y1 L$ l V/ u
) V4 V+ o8 n5 M8 Q4 L) b7 M3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
+ o/ C [2 }3 o- x& H9 H/ `————————————————
# J2 w" t- P* a6 p* X, i! r版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
* V6 Z& b9 p c* n+ _3 `# \8 G原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|