|
|
报错信息:0 b1 ~% y* @9 O6 g! c! n. ?7 y
```bash: q5 Y9 @/ W) F8 O8 O
gyp ERR! find VS, O1 s( q( f# ~9 g4 t( I, Y% U- S, B
gyp ERR! find VS msvs_version not set from command line or npm config
3 E y- M$ H* ~8 f5 Y+ Jgyp ERR! find VS running in VS Command Prompt, installation path is:7 e: h) ^! c% f' T( K4 H9 e! j
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"( V1 ]" I# Y: c9 \. M
gyp ERR! find VS - will only use this version, B- j c9 s: J: f
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer% i9 D' u# C x5 h! j4 c
gyp ERR! find VS looking for Visual Studio 2015
: z! V+ w K2 N$ A; }gyp ERR! find VS - not found
$ x& t5 `9 J8 e+ ?gyp ERR! find VS looking for Visual Studio 2013
, U( i) C' G8 C$ U# y8 ygyp ERR! find VS - not found
3 W9 J) H! U" {8 J. v! Q5 Fgyp ERR! find VS+ a# D' |: r3 S: \
gyp ERR! find VS **************************************************************
: |0 P, s1 g) L/ X% B! T8 vgyp ERR! find VS You need to install the latest version of Visual Studio3 w& D) `+ p' l3 Y5 B/ z
gyp ERR! find VS including the "Desktop development with C++" workload.
- J' C2 G! e, @+ [/ Egyp ERR! find VS For more information consult the documentation at:
4 Q6 ^$ K* P+ z6 p' u: M7 Tgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
8 I" y) B$ ^. d+ Z, ?& v$ hgyp ERR! find VS **************************************************************) D) L/ q8 i w$ A
gyp ERR! find VS1 z# C- a- |2 W* N: q8 e; w, `
gyp ERR! configure error& ~4 O2 s$ L5 B5 U/ h' i
gyp ERR! stack Error: Could not find any Visual Studio installation to use1 Q- L" a9 E( P" W( }
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
5 Z1 f! V1 Q8 n9 @dio.js:121:47)
( d, @) c& Q+ O) {- _" l+ y5 lgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
@$ M- `# R/ I* u! o2 Y4 [gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16# f* ?: N1 `) p$ W2 K* M
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
# V. O& [* {, U/ w8 o% wgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
* c4 s# r! D* w. Y; [+ L' ]+ u. `. dgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
; V5 r1 I% d) R( Sgyp ERR! stack at ChildProcess.emit (events.js:315:20)( y5 v3 \7 ?# {9 W5 w/ ]9 \" m4 v1 v- Y
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
1 d) q$ m: r6 U3 a2 y4 {gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)# }5 Y6 Z/ ~: w, `' a& r4 f
gyp ERR! System Windows_NT 10.0.15063
7 {1 [( |0 |, v: p, N: K/ a F0 P4 G7 i
解决办法4 @: M( D J' m
1、卸载nodejs重新安装一遍& c& f4 D$ L! R
) d" n% m6 G5 q# T3 Y( J2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org+ v7 X2 {( V+ T! l" D
! l5 U1 O) C0 s3 N
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
6 D- E( m( } j' _8 P- H———————————————— W! m/ d1 y0 }* }
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
2 I ?, v, u- Z) I9 C原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|