|
|
报错信息:- f' _$ z8 M( X+ u# s+ C* I
```bash/ E0 E- i) d2 p( v, @/ ~3 E5 J
gyp ERR! find VS
9 x% i8 k, D2 G) |gyp ERR! find VS msvs_version not set from command line or npm config
0 J# G7 ~) o0 ngyp ERR! find VS running in VS Command Prompt, installation path is:
# E0 t, k2 K7 j; ~1 j+ dgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
, A+ y* c9 i) d' n9 P5 Wgyp ERR! find VS - will only use this version) j5 R" x$ C$ D* C; n# T! N) h
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer8 ^ b4 R. w2 M7 `" i
gyp ERR! find VS looking for Visual Studio 2015
6 s, @# Z& ?" \/ Egyp ERR! find VS - not found
8 ?! F8 ?: }* N4 bgyp ERR! find VS looking for Visual Studio 2013
( c# a. D1 ~+ } agyp ERR! find VS - not found2 t" O! d' p& D6 ^) j0 @$ g
gyp ERR! find VS/ g+ C6 K. `. ~- x
gyp ERR! find VS **************************************************************
% s. K Y9 l$ H& E) p% b1 ugyp ERR! find VS You need to install the latest version of Visual Studio* K4 o1 i7 _% x$ G
gyp ERR! find VS including the "Desktop development with C++" workload.
$ h5 p. Z. v, N s( o' ugyp ERR! find VS For more information consult the documentation at:; n$ U: Z7 v" c8 b
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows, _! r2 P M& Q1 l- V& o
gyp ERR! find VS **************************************************************5 E/ d9 d: p2 B3 T0 [; G3 ]
gyp ERR! find VS( I1 L- R) z- v/ ^3 w8 t% h
gyp ERR! configure error
! h" Y$ d; C; d+ Vgyp ERR! stack Error: Could not find any Visual Studio installation to use# s! m& D+ v' X9 c
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
) T5 \" ~8 d8 L6 j; K" ]dio.js:121:47)1 M+ m+ M! ^. \
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
. P" J2 b/ K8 vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16* [* o* P% S$ \
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7" Z4 `5 A& Z3 C+ Q* R
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
- ^- ]& C5 }$ H$ hgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
* u# O8 I6 C, j( M% K. mgyp ERR! stack at ChildProcess.emit (events.js:315:20): Y0 [4 u; K: o( H6 T
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
1 v5 H1 B j6 n* J% Y+ h) Fgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
( i' q1 I9 i8 q- [( Tgyp ERR! System Windows_NT 10.0.15063 7 c8 |3 a8 f( j' h
- m3 F M- ?3 a- n解决办法# ^: N; E0 P2 h( f7 ]
1、卸载nodejs重新安装一遍
' b5 k6 f2 x" r7 Z: H( I, {
5 r) o+ m# w2 f6 p8 T8 J% w2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
; u* n0 Z# r! b/ [0 G, {5 x a4 j# T0 P$ y* i6 s7 W& e5 s
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools* r3 V1 X' |' j4 D
————————————————& J& `/ U; P& K- F, i @% s
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
- H* h2 N: K% ^5 G1 U. s% i; i) C, I原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|