|
报错信息:
+ ^- ^0 \; m! O0 N @5 d```bash' g" f/ O v# t2 R) A' P
gyp ERR! find VS
# D. j0 ?3 J7 K i8 `( }& M, M) igyp ERR! find VS msvs_version not set from command line or npm config
; |! w7 _! F$ r5 M) ogyp ERR! find VS running in VS Command Prompt, installation path is:
F3 Q, g1 u# p- Vgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"* T9 d2 {5 E( P" a/ h4 g# [4 S
gyp ERR! find VS - will only use this version, s7 N1 P% T2 X. _) l1 d2 e; t
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer2 N3 \5 c* U& h. w1 g' F C
gyp ERR! find VS looking for Visual Studio 2015, H* `7 `( }4 G1 s; r7 c. R7 g
gyp ERR! find VS - not found
7 h( Y( G) X3 N( K% Bgyp ERR! find VS looking for Visual Studio 2013
; C0 X6 B1 E4 z, A& |: Egyp ERR! find VS - not found. H/ i+ M0 R S# t
gyp ERR! find VS
; c( M& `( x; L8 i: ygyp ERR! find VS **************************************************************
! I: H/ y& ?! m- M" [/ x$ D. Dgyp ERR! find VS You need to install the latest version of Visual Studio
( E K. R( s! xgyp ERR! find VS including the "Desktop development with C++" workload.
8 d. d k6 w6 F$ I% Mgyp ERR! find VS For more information consult the documentation at:" Y7 [" A0 x: C: r0 `
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
2 T: ]. ~$ O! `, M9 `& X% m' Sgyp ERR! find VS **************************************************************
1 M) ^3 X9 F& Rgyp ERR! find VS
" T1 C$ J9 @% [! j' Hgyp ERR! configure error
' ~6 E7 z, r" t% }* J$ ^0 Mgyp ERR! stack Error: Could not find any Visual Studio installation to use# _8 ?0 ]4 X( j
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu+ p1 H w* h( V1 s! r! o, L
dio.js:121:47)4 f: |# B, b* B6 y8 P/ j2 h! V7 u3 x+ t
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16$ j x2 }4 [. k6 n( L
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:165 m4 T7 P: ^, `! x$ e4 Y [
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
5 |' O @; i+ X/ P4 x; {' i9 Q5 |gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:167 v+ Q3 b# O; W: x o
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
7 ^. x* W, i/ pgyp ERR! stack at ChildProcess.emit (events.js:315:20)
2 [3 X) b6 K$ _! p1 zgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
8 N h% E* g. j4 d# ]0 ` xgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)/ v! J8 v1 f9 n
gyp ERR! System Windows_NT 10.0.15063
$ U4 b P/ I2 p% D7 `7 F6 d3 F8 G* [
* C f& F' I% n- y! x W" N# s解决办法4 }: p$ g5 u: ], c% u
1、卸载nodejs重新安装一遍0 u9 O; Y% D+ Y2 a, q9 z; S
8 a% Y1 v8 Q, W. c) g2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org% @( v! ]" f* L. A& P1 `5 q3 A
* X: x3 F* i" d
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
+ H* S9 A8 i- T$ W& ^————————————————3 W* f z& j6 K) X$ A
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
6 n! Q; {! I" a9 e& F原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|