|
|
报错信息:( ]1 J6 J& r. Q
```bash
; ]1 U8 E0 l0 ?+ Q5 I, sgyp ERR! find VS
3 V: O- T3 n; X( [# y( N, B; Mgyp ERR! find VS msvs_version not set from command line or npm config
8 R0 J" J7 Q& d6 Z1 s! |; Igyp ERR! find VS running in VS Command Prompt, installation path is:0 S2 L8 |# o5 k3 j
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
& a M7 _! {8 p0 _+ f- o7 Igyp ERR! find VS - will only use this version
2 W) r8 n4 Q4 l4 Egyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer: v/ `- H6 E. ~
gyp ERR! find VS looking for Visual Studio 2015
& R& w$ X( }% t4 R6 }3 ]4 @gyp ERR! find VS - not found! t, U9 a9 z0 ]' [0 y) o2 q. M
gyp ERR! find VS looking for Visual Studio 20131 Z5 z" ?' ?7 Z
gyp ERR! find VS - not found, L+ M( r1 B# ~5 n0 d
gyp ERR! find VS
9 {# ?* P+ T) R! K" d! f, \# h1 H8 @gyp ERR! find VS **************************************************************$ n/ O s! i+ b! G& S9 t
gyp ERR! find VS You need to install the latest version of Visual Studio' g3 ?6 c2 J! q& V6 \! m; o* P
gyp ERR! find VS including the "Desktop development with C++" workload.: E+ C) o, k6 }* K4 z
gyp ERR! find VS For more information consult the documentation at:
7 E1 q; S6 A/ p1 |gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
; X8 E; e0 Y2 U$ M9 l4 T; c5 Sgyp ERR! find VS **************************************************************
/ y: V: \5 X3 G/ l0 Q' g U2 Ygyp ERR! find VS
, d h' I4 n( W* ogyp ERR! configure error
& s+ E9 F: `$ Ggyp ERR! stack Error: Could not find any Visual Studio installation to use9 I2 X2 o# \! Z. O5 Z7 W( x/ Z
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu! l$ _' ~( b! V/ L) m
dio.js:121:47)
# s/ S5 S% J$ F4 ^6 Kgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
$ U# I! ^7 z0 _; ~: Q- K: I: s! }gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16; u! z1 R$ X/ [) s$ [* o
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:76 g( _3 t& n; H- O
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:163 }7 V4 w, P v1 `+ v) Y
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)3 t, V) W$ m, B( l8 A# F8 v3 d
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
8 j3 J$ i/ |5 ^8 r8 G" c( E: }7 `) |gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)% Z; J" y% W! k2 U8 ]) ^
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
a% w( b. W& R( agyp ERR! System Windows_NT 10.0.15063
/ f. D# k2 _/ p8 a# g0 i2 T, ?# g: U5 N6 Y
解决办法% Z6 u. t- q& `7 ^: z9 G3 X
1、卸载nodejs重新安装一遍
7 o; c5 a$ n* `6 X
# ?3 z+ G& J) k7 }) F- I2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
4 ]/ S" Q x4 i+ E* i: p, h
( ]4 s) s" g: M' X3 x3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
* a4 v9 I2 S* ]8 y————————————————
7 I% x& g C! _版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
* E3 ]4 Z; F4 A1 S原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|