|
|
报错信息:
, z3 u/ z- p0 r$ Z```bash( y" [5 m ^5 m0 s
gyp ERR! find VS2 O, X9 l% n6 I. c. u
gyp ERR! find VS msvs_version not set from command line or npm config/ F5 U/ y4 h( @' I2 X7 T$ f6 }3 u
gyp ERR! find VS running in VS Command Prompt, installation path is:
2 N: H+ y& k1 Q& G! j1 |gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
7 u2 X" u' ?7 K9 u9 u' @7 k+ K9 bgyp ERR! find VS - will only use this version
0 V1 _4 }' P# u' Y6 r& ^' M+ \* {- Hgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer7 {# ^, m0 X; N: K9 _8 G
gyp ERR! find VS looking for Visual Studio 2015% v: r, m' f6 _/ Z& Q: I
gyp ERR! find VS - not found
?; e& N. H) X; G8 e9 ~. _% O. _gyp ERR! find VS looking for Visual Studio 2013
4 W! V6 y- q, _: X9 b) Z1 Lgyp ERR! find VS - not found0 C! q# N" Z: J& ]9 x9 S
gyp ERR! find VS
* Q3 a; A$ e! A+ a, y- c; S7 M) ^gyp ERR! find VS **************************************************************% f. v) y) h, K d/ g
gyp ERR! find VS You need to install the latest version of Visual Studio5 B1 ~" S3 f1 J- X7 Y
gyp ERR! find VS including the "Desktop development with C++" workload.
3 }: n, P( ~ E- V0 N) _gyp ERR! find VS For more information consult the documentation at:; B+ d' ~1 I( |# O
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows3 v/ m- Z Q8 H6 N1 [+ g
gyp ERR! find VS **************************************************************- Z# [/ q, {% }% Y3 M+ A
gyp ERR! find VS) R1 v$ w# s- k3 I9 Z
gyp ERR! configure error& P4 A. E3 }$ O7 s3 d
gyp ERR! stack Error: Could not find any Visual Studio installation to use3 e; d& W1 d: u7 M3 M/ @
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
! v9 c: O: ?( r/ E/ o2 Ydio.js:121:47)9 i1 f. N+ d$ c/ J: J: d
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:162 _# E- k1 t' e( A8 }' x) E
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16: Q0 m) }6 x1 a
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:77 o+ r$ j: l }: A8 R2 G) P
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
6 `: { `; L/ }8 i; Agyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)* K$ o* L5 |" Q; l9 @$ Q. `
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
9 s, K( e @6 h8 hgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
. ]1 \" C- K* ?* ~1 R3 u: `( H. @gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
4 P% D- S9 v) L& ngyp ERR! System Windows_NT 10.0.15063 ' N! |6 h h5 s% k" @" ?/ r) \
j6 T, J* d8 ` {. l% Q0 W4 \3 ?: j解决办法
7 N7 D% X4 \, C$ C8 v1、卸载nodejs重新安装一遍8 V: e3 v* ?, {* t* D
/ d# l+ ^9 P5 K8 ]9 `' }: ?3 {8 z
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
! I) {$ ]+ ]2 C; @5 O- |
" F7 Z9 F8 w/ K3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
6 G+ c$ M/ S; i h————————————————
2 o2 `/ y" u6 `+ ^/ m$ Q2 D/ k版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
: }! V% n0 [& z! [, @, _原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|