|
|
报错信息:2 t6 M/ F8 v& K! Q6 _) g
```bash
3 q: `0 k: l2 O# k8 }; Zgyp ERR! find VS: n. n# |2 `5 [ t4 ~8 k
gyp ERR! find VS msvs_version not set from command line or npm config y7 C3 w& o, h1 n$ `
gyp ERR! find VS running in VS Command Prompt, installation path is:* t' H; A& f2 A: h
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"; V( q! P6 u: |) ?8 v6 ^
gyp ERR! find VS - will only use this version/ b, j7 `- D( w- U P- q
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
/ F/ U' E/ S5 zgyp ERR! find VS looking for Visual Studio 2015
$ P! O+ _$ v6 K- r) f, \8 kgyp ERR! find VS - not found
! a3 n( y* Z7 P6 z) X6 B& v4 Xgyp ERR! find VS looking for Visual Studio 20131 R, g! d$ U/ x; X
gyp ERR! find VS - not found7 j$ t7 a, x6 T" X' Y+ P
gyp ERR! find VS
9 N' E3 t, u E; sgyp ERR! find VS **************************************************************: J9 t- A: Q$ F
gyp ERR! find VS You need to install the latest version of Visual Studio+ a s, ?+ z, y+ ^. T6 M
gyp ERR! find VS including the "Desktop development with C++" workload.
, B2 a8 X" D/ h6 W* ~, ]5 rgyp ERR! find VS For more information consult the documentation at:
; d0 y) f4 M% h6 W; I7 Kgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows. q8 }: h0 ]# k, g7 H( s; @
gyp ERR! find VS **************************************************************7 K9 U3 N, p; q+ K
gyp ERR! find VS
+ M6 _+ z6 s! h9 ngyp ERR! configure error+ K, ]- H% d7 e6 |6 m
gyp ERR! stack Error: Could not find any Visual Studio installation to use
1 n' a6 A) y7 f# ^/ H# \1 c! Ggyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu% [: K$ R9 f* j: v4 ?3 d
dio.js:121:47)
2 C1 a: t8 D( f0 U: o2 t* k$ Igyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16) V/ w# F1 ]$ @: |% {: }3 b
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:166 |3 b, h, O% F' u" d2 F
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:79 v: `4 o! M6 ?! G
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
, y6 U0 }) w6 [5 _6 e j/ |6 u) ?gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
. k1 J9 [ z6 W5 O6 e/ B& \. [7 W! {gyp ERR! stack at ChildProcess.emit (events.js:315:20)
: z0 W' l" ~# z0 m& E9 cgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)' q5 d* I; O$ x u
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
) ?7 j9 f3 L' Pgyp ERR! System Windows_NT 10.0.15063 : Y1 T+ C3 i: r2 ~! C- T
+ F- e% N) \1 [5 i2 O/ `, i解决办法
, @6 z) I9 }7 p$ Y1、卸载nodejs重新安装一遍3 O( A9 U/ N) @/ g! r# _' a8 ~
# ^# a( h; n" v8 y2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org& q, E N/ P( d1 a4 d6 D
+ o' H- F5 N2 K; H b7 V$ a
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
2 Q% ]+ N6 o S2 s* S# ?————————————————" j3 X* X8 u0 m M
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。& ~+ p$ l, A! w" E5 X
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|