|
|
报错信息: _* k- Q9 d6 z" s
```bash
) o1 j/ n8 B) W5 s; T% x7 ^gyp ERR! find VS
# m3 {7 j# ?* a G. ugyp ERR! find VS msvs_version not set from command line or npm config2 [- G; P3 }! [1 `- g
gyp ERR! find VS running in VS Command Prompt, installation path is:( G, M! n8 y( W' u
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"5 l+ [) C2 j: ?' F) R
gyp ERR! find VS - will only use this version& v4 p" w8 [7 H8 p' u: O
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
5 A; x" _* ^, F$ O- \ x+ U; G1 a) v# ?4 igyp ERR! find VS looking for Visual Studio 2015
5 o# r1 @4 h+ R- z' mgyp ERR! find VS - not found8 d R% b6 u6 Z6 n
gyp ERR! find VS looking for Visual Studio 2013
! ?, z3 [2 {. Y/ E4 agyp ERR! find VS - not found
+ i: A* A3 O% d# M& z9 P1 lgyp ERR! find VS0 V; F+ r3 O' A
gyp ERR! find VS **************************************************************
+ [0 T+ {1 a' J7 ]) x; s8 ggyp ERR! find VS You need to install the latest version of Visual Studio4 X; t# u, S2 V! [% f5 O8 y, L
gyp ERR! find VS including the "Desktop development with C++" workload.% f" V& ~( d7 V7 F d+ Y
gyp ERR! find VS For more information consult the documentation at:" Z' ]; a7 A" ^2 B# I" B4 ^
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows7 i5 `& s9 Z% |# g2 M" m- C! z
gyp ERR! find VS **************************************************************
3 q! A6 C( m1 ]+ ]gyp ERR! find VS; q6 H F! q) m/ O6 n
gyp ERR! configure error7 V% w& ?/ e7 X6 s' }/ ^5 @# |
gyp ERR! stack Error: Could not find any Visual Studio installation to use
+ v$ s6 \" ^% h" h9 ^+ ^* Wgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
7 ]8 u2 o& ~7 |2 w$ L% ndio.js:121:47)
3 V- i* y# G3 C4 C ~: |gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
" L( n5 s- l i( sgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16# v: j* B3 u- I2 G. N1 J7 a
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
: i, p6 J7 R) y$ O/ Fgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
) K9 T8 }! u. t x2 j$ V. k+ q* Dgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)2 F+ u% V. U+ c1 O* i+ Y/ l
gyp ERR! stack at ChildProcess.emit (events.js:315:20), P) g# B% u: [; D
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
K9 r: s0 T, g* n: N; c; h1 Ggyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
, _* s- N e* k$ b& `. A8 p/ Ggyp ERR! System Windows_NT 10.0.15063 0 [1 c9 ~. O/ ^# g1 P2 N8 a
/ T, m4 f0 T4 A9 `' [# _. a( @解决办法
0 b, T9 L% p3 P) c+ ~1、卸载nodejs重新安装一遍, r2 A9 y, Q8 @( F2 M, F
/ `( G9 }3 B* t P; [1 H' p- q2 }. H2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
, e5 b& b1 x: @
# j, ^% @$ ~0 b& x, P3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools) O$ u' C n8 }* J, z0 Z- r
————————————————
& ]. X# V+ h& T版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。) @0 k% R. r9 i) h; R$ _
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|