|
|
报错信息:3 a! v; y$ Q5 ^3 a3 v* n
```bash
9 p) i# o' J7 a3 j$ I2 Ggyp ERR! find VS
9 q, @, `/ { t; S- F* Y u6 igyp ERR! find VS msvs_version not set from command line or npm config
) ?. x( H. m- N- N" {1 c8 pgyp ERR! find VS running in VS Command Prompt, installation path is:
( k7 V: [6 p( I3 Qgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"5 b/ G! b" E7 [; G& S
gyp ERR! find VS - will only use this version8 |; b: ?$ s. M+ y5 |1 S
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
5 x8 B. p! [7 l3 m7 K: hgyp ERR! find VS looking for Visual Studio 2015. m' ]7 J: I8 {2 A! |" I$ S5 G0 Z
gyp ERR! find VS - not found
4 _, s1 m3 F* d. g6 agyp ERR! find VS looking for Visual Studio 2013) G A( T# J6 L/ s' o; B
gyp ERR! find VS - not found B" g" O; O0 H9 P4 N
gyp ERR! find VS& Z9 V" B# U! q* X
gyp ERR! find VS **************************************************************$ G. b' E& a" @" x$ j
gyp ERR! find VS You need to install the latest version of Visual Studio- G' T& M6 Z5 u$ Y# O
gyp ERR! find VS including the "Desktop development with C++" workload.7 a. u- W" F/ _* h+ `+ h2 q9 a
gyp ERR! find VS For more information consult the documentation at:- Q e4 b. E7 u* a3 N" G x2 g9 j
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
* }9 a' M5 ]( c) Ugyp ERR! find VS **************************************************************
a* J, e) c) z i5 Y4 \% M! P$ kgyp ERR! find VS+ m" N3 w% \" S; @6 d
gyp ERR! configure error
# K5 \4 K# |8 l3 n& T3 [7 v' C: Zgyp ERR! stack Error: Could not find any Visual Studio installation to use1 h H+ o4 A x: u$ }4 m# o
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
0 N5 R$ y5 U) A9 h1 z% Z# xdio.js:121:47)& a$ `2 s, I+ F6 v6 \( }
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
; ~# Z' @8 t5 O2 [. B9 t* P |gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
7 n( g9 g: _# [; D k4 Y2 hgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
; q9 C' T# v2 c7 l, xgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
9 ^8 l+ U$ {% c4 ]) p9 hgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)- R7 B* D; q* n; N; t& f
gyp ERR! stack at ChildProcess.emit (events.js:315:20)2 D# s$ u9 a# S+ p
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)5 ^% X! u3 P1 L, b; d0 Z
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
! P5 E! {0 h" B; i! G# {8 Cgyp ERR! System Windows_NT 10.0.15063
: N$ V% N) r2 j! @, S' q. z1 Q
" H. V' E% E; w. c解决办法. ~( K9 ^/ {5 b& p( W) Z+ {+ l
1、卸载nodejs重新安装一遍
8 R' h4 H1 i% l c9 g1 l" l1 b% m5 W) |
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
0 G" r) j5 L7 X) |% i0 v) {5 a! S2 Z4 E' j6 h: c1 T) E
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
( D- G: e+ H+ [————————————————9 R: b1 C. O" D3 { ^7 ?# r
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
! ], V2 X9 N/ ^$ o原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|