|
|
报错信息:
" d9 Y& c# {) X```bash
& W7 q: G1 F `% F' y9 kgyp ERR! find VS
7 Q4 x5 d9 K4 |$ egyp ERR! find VS msvs_version not set from command line or npm config
. j2 X" E0 k' {. Pgyp ERR! find VS running in VS Command Prompt, installation path is:
' {# U# B) P$ f2 Y" @7 \gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
* i* W k% m0 G4 {8 ^' sgyp ERR! find VS - will only use this version
5 n0 R! k& H7 f4 w9 y4 fgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
; B2 h' n7 K/ t) ?" w" @2 y: B3 R5 Rgyp ERR! find VS looking for Visual Studio 20152 N) Y) X" f: Y# L" f
gyp ERR! find VS - not found' ?! ~2 e4 q e, C9 C2 U0 [3 C
gyp ERR! find VS looking for Visual Studio 2013
1 n' T- H. {& m' s6 v) x0 v D! Pgyp ERR! find VS - not found
# h- L0 x8 I# x8 m# [gyp ERR! find VS
! }% ]# g4 w5 @4 a* e7 A6 cgyp ERR! find VS **************************************************************
0 v7 f6 x# g" |6 i1 D4 Tgyp ERR! find VS You need to install the latest version of Visual Studio& b/ p8 J9 B8 m" v( ]% U- ]4 | d
gyp ERR! find VS including the "Desktop development with C++" workload.
* ^% H+ ^; H9 a# V3 c, I$ ?gyp ERR! find VS For more information consult the documentation at:
1 C3 ^6 c) n( f3 j% Ugyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows! _( o9 z! S* _4 t$ Y) l
gyp ERR! find VS **************************************************************
+ [" K" K3 w( V# o' J" R mgyp ERR! find VS* q X% i2 K, ^/ T9 j0 P+ k+ t
gyp ERR! configure error8 C5 r$ V" G6 d' q, x% x
gyp ERR! stack Error: Could not find any Visual Studio installation to use1 S3 A# B+ e$ v7 D6 E
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
8 ]7 s+ f6 q" [! Q% C/ hdio.js:121:47)4 c( N! ~# J) g# h( J
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
+ v6 d y/ U9 {% H9 egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
& E' d9 f( E& N: [) f$ vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
) o; O% @, I9 ?4 c- x5 W* ugyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
: L5 R8 K" z- @gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)- X% ~3 m: W8 }- k' Y. }
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
) @/ P: ~( B: |gyp ERR! stack at maybeClose (internal/child_process.js:1021:16) C: X' t, ^3 z4 {8 D( J3 W
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)% v+ \8 s* x: c" ?/ J$ @' ?) X& o
gyp ERR! System Windows_NT 10.0.15063 0 J& p% [' E# J- O7 C0 M
2 b( o1 g- O1 ~1 Y' \! k1 ]
解决办法. V4 C- X) e# z2 |+ N' S1 F
1、卸载nodejs重新安装一遍- f) E& F& T7 r2 _4 a1 g
6 j: t3 p4 X) w! b' R9 S5 Q6 A$ X6 W/ S2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
5 P! i- n! F6 L/ m2 q# |8 Y+ q' N6 y$ B; e1 ]6 C
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools" K9 w0 l1 i; k8 ^2 Z2 \! V
————————————————
+ n. V! |# U4 S2 ?9 w8 X1 `版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
: Z3 b3 G, X' h. e原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|