|
|
报错信息:
( R" `* J9 G' n) W) F- Z8 V```bash
' ~5 N; G0 r+ I+ I: J7 ]& Pgyp ERR! find VS/ r! Y9 A' j& D, I
gyp ERR! find VS msvs_version not set from command line or npm config
0 J0 k5 M$ {- [" G+ ]& v! B0 Sgyp ERR! find VS running in VS Command Prompt, installation path is:
. t: C& a, N# }, k9 Ggyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
3 D: v4 G" C" t$ K4 K2 Hgyp ERR! find VS - will only use this version/ E" ~4 j# U! h3 } ?2 V' q/ Z
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer0 V: D4 @: {, \, p# C
gyp ERR! find VS looking for Visual Studio 2015- q2 S, j; ]3 W# D3 x
gyp ERR! find VS - not found) A* r, }" h' n* r. @, V
gyp ERR! find VS looking for Visual Studio 2013
; z" J) m* [4 E0 Z$ egyp ERR! find VS - not found* e" m$ X6 B5 U/ `# y# P
gyp ERR! find VS
J' k$ R$ j; K$ C7 ` agyp ERR! find VS **************************************************************$ U/ E) K$ S# c+ H9 w9 W9 G
gyp ERR! find VS You need to install the latest version of Visual Studio
' {: W3 o. B; }- L, t" agyp ERR! find VS including the "Desktop development with C++" workload." T' j$ `/ \! |' e _
gyp ERR! find VS For more information consult the documentation at:! M1 R4 h% E5 f5 D. o+ M/ x
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows' o6 P( j5 U; y# c
gyp ERR! find VS **************************************************************6 W: K2 W6 B; L8 W
gyp ERR! find VS
- G: h' s9 w5 j$ e2 L6 Q/ ]5 mgyp ERR! configure error
* T; `7 o5 z8 J+ J3 u7 pgyp ERR! stack Error: Could not find any Visual Studio installation to use( d, l- y5 D- s- i& ?4 Z
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
$ T/ Z0 E0 w0 w9 k2 sdio.js:121:47)& F5 N# t3 |# K9 ]2 M4 v7 s- f% D8 {: J
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
2 d( k' E- o1 A3 l8 W5 n1 ^gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16* L. [. |' }" Q3 _0 |! e3 f
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
. q3 q: c3 ^8 ^& g- Vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
/ Z! d. v' P- I0 i' w0 v7 o \! m0 {gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
/ p7 s0 y& x2 a- `2 ~% pgyp ERR! stack at ChildProcess.emit (events.js:315:20)* o( h+ K+ x/ p5 N% w/ B' @% ?
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)% @ }3 M6 L P' o1 g6 H1 a
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)1 g" I: ~* W0 m
gyp ERR! System Windows_NT 10.0.15063
1 p* l6 H1 [) q
+ _2 B' j# Q/ M* I7 c( ]解决办法
5 X3 C: u5 _- Q, K: m9 h6 @* a- X1、卸载nodejs重新安装一遍- c% P1 ^ W: e* v3 u. z5 z8 Z
# t7 s; ?3 T% B$ f( U! O9 B2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
# Y# Y# W$ [) {- y e C3 X8 O0 l2 v- L: g
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
& H4 `) `: t) G) O————————————————; y. k% i# x$ K- k7 n
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
; `# p$ i% F& e y7 L) H原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|