|
|
报错信息:) }/ j" x& z7 W/ y1 q
```bash" [; e6 r6 \3 p( w/ U" y! n$ I
gyp ERR! find VS! ~# v6 b, ?' w; o* a/ P6 x
gyp ERR! find VS msvs_version not set from command line or npm config9 u! ?4 Z$ d! \" i8 v
gyp ERR! find VS running in VS Command Prompt, installation path is:
% O" ^" d$ y) c" \1 I8 X& bgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"/ d9 W, U0 v, H# u3 u! X- I
gyp ERR! find VS - will only use this version
! o2 d* _3 J/ ^" t, Z; |gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer8 m8 j8 t4 ~. z+ i% b+ S% {
gyp ERR! find VS looking for Visual Studio 2015
6 M; D) C) m+ \* g8 U% ggyp ERR! find VS - not found
$ f6 R- \% a5 X2 s. ?/ }gyp ERR! find VS looking for Visual Studio 20132 N+ V+ j+ Q2 L3 x/ ?
gyp ERR! find VS - not found
4 q$ `. L& Q$ O. q; Wgyp ERR! find VS) r" Y' {# x, S7 @6 J, P
gyp ERR! find VS **************************************************************
; k/ e6 q+ L0 l9 T9 Ygyp ERR! find VS You need to install the latest version of Visual Studio; E) \3 B4 U I1 P
gyp ERR! find VS including the "Desktop development with C++" workload.8 P1 ? G9 \1 {' C
gyp ERR! find VS For more information consult the documentation at:& w/ z$ D- ^6 w# y) E: K
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
% w3 U% r+ t; Q1 `gyp ERR! find VS **************************************************************/ E/ Z7 x5 A, s: u
gyp ERR! find VS, H9 Z2 W4 i& A3 ]
gyp ERR! configure error
" J2 z/ s Q: z4 q) Wgyp ERR! stack Error: Could not find any Visual Studio installation to use
9 K7 X0 F; D/ S* b a9 ogyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu( v4 n; S* B! K0 L. c# l
dio.js:121:47)5 R X; {: {1 E) A2 T
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:162 E! n; |5 V8 P4 B( p0 s2 u/ T6 K
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16- n9 O; C1 q% \/ m: J3 ^
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7- {8 ~6 ?/ ?: E3 l8 d7 p9 Z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
5 t- P. k& I6 G2 ~: C8 Dgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
) R% m3 q! Y t' W/ xgyp ERR! stack at ChildProcess.emit (events.js:315:20): g& m- p7 n0 ?
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)* K1 Q, N b5 y% Q: z8 N. [5 |& T( f
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
% m* _" x7 b! R% D4 bgyp ERR! System Windows_NT 10.0.15063
) n$ @, v1 Z2 M8 S
7 q+ A7 V1 u8 h/ a解决办法
9 ?8 {& z0 b) h) u5 `1、卸载nodejs重新安装一遍) g6 e8 ~; l4 H
% b0 E4 j3 s- l
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org2 d+ x4 ~, M' G% D, |
/ p& |( X. {0 _1 u" E6 f
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools7 b% ?2 U7 q+ }- p) v! Q
————————————————% Q2 K# `- }, B' ?0 G1 t+ F
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。8 }- G1 \% m' P5 I- ]3 J8 i
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|