|
|
报错信息:
2 |5 {4 Z7 u) t2 D7 u! m# w```bash
7 Q6 ?$ A X5 h! l. I# jgyp ERR! find VS, O! Q/ u" O% Q) n1 F4 A, G
gyp ERR! find VS msvs_version not set from command line or npm config
7 B7 J: S: O- i9 hgyp ERR! find VS running in VS Command Prompt, installation path is:0 v* p& o# y* h [4 ]% w4 v
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
$ q C& J- e# o4 dgyp ERR! find VS - will only use this version
2 Z7 T9 _0 [. w! `+ V5 h' Sgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer& ^0 s6 P+ m2 D: e7 z) d6 w
gyp ERR! find VS looking for Visual Studio 2015
1 l/ D; n: n2 R1 U9 L3 S1 i( I+ `7 ygyp ERR! find VS - not found' V3 e9 `; z+ A$ Z
gyp ERR! find VS looking for Visual Studio 2013
4 ~& Z: Q% ]% f( H; O) Lgyp ERR! find VS - not found
5 \1 | R6 P- F1 I' m1 u; X; s: Ugyp ERR! find VS
; I# r- U# L) P1 B K+ Jgyp ERR! find VS **************************************************************
6 ?) M2 w, r: |8 e3 D& ?0 Agyp ERR! find VS You need to install the latest version of Visual Studio
7 J$ @- K7 X5 f: G7 Mgyp ERR! find VS including the "Desktop development with C++" workload.7 U9 T8 d: q" _9 L) V
gyp ERR! find VS For more information consult the documentation at:, t+ n) y# S% e; H0 Y" f/ T4 r
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows) r$ L$ y1 G+ V& N& p7 g
gyp ERR! find VS **************************************************************
8 F: M& s5 G @/ a& ]4 S( K8 Dgyp ERR! find VS( _* k3 D' `1 ]* e
gyp ERR! configure error+ M4 v* G0 s, n, N
gyp ERR! stack Error: Could not find any Visual Studio installation to use5 [. Z5 i" ?6 N* W5 S
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
" B: o! a3 @8 ~dio.js:121:47)
" U/ K7 a, E$ B+ P. Ogyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16& |/ |$ W* k1 M
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
# { e x1 ]) \" Vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7, Y1 P. P* i; D1 ^1 S8 `7 J5 E/ T
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
( V: U+ W+ j8 Lgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)/ @+ @; e$ i( x8 R) G) c! j% c
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
* Y. v' K/ D1 F# P/ [7 d) m9 zgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)/ {/ s5 f8 a2 ]
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)' L- D- R' v& t* C; E4 Q, e! K
gyp ERR! System Windows_NT 10.0.15063
3 {. v1 A* s7 P. Z( B5 E8 c5 i D5 }! \9 m3 N& {
解决办法
" Q0 q$ L" @ ~- Q1、卸载nodejs重新安装一遍! g# u' V1 W9 r* w
. s8 R" s9 n8 i6 P3 Z) _2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
( G6 W! ~& t' b
( _! v: I0 K: P! o2 `* I3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
9 K. e, J. W4 ?————————————————' J5 D: S, q5 t- L
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。0 J% o+ p! k4 i1 i" E: ~
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|