|
报错信息:! A9 Z y' i# r' M
```bash+ F e+ ^. o. ~8 J9 y7 z6 }
gyp ERR! find VS5 M( S# C, T& {/ Z+ l, X$ k% k
gyp ERR! find VS msvs_version not set from command line or npm config5 @% u% C3 f4 Q$ T* @
gyp ERR! find VS running in VS Command Prompt, installation path is:
. e3 j/ G7 h" c6 K( U% Y4 C0 N/ Zgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
4 j# o. n9 j' _$ {gyp ERR! find VS - will only use this version
. h' e+ E8 y% R' Ggyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer+ v0 @4 b3 ^3 Q5 A, z: v
gyp ERR! find VS looking for Visual Studio 20159 h8 }4 U" C6 I3 k: G
gyp ERR! find VS - not found
5 i# L# E* L1 {" zgyp ERR! find VS looking for Visual Studio 2013; T: e1 {6 A2 s% i3 J
gyp ERR! find VS - not found
) \7 S* c# [: r' S( K# {gyp ERR! find VS
: D' }! c: X; Rgyp ERR! find VS **************************************************************8 a( T. [' B: t, s* b! W
gyp ERR! find VS You need to install the latest version of Visual Studio1 B& b/ n1 U" w# t3 j$ i. r
gyp ERR! find VS including the "Desktop development with C++" workload.- e _& w8 {4 H7 R: M' j3 O9 H
gyp ERR! find VS For more information consult the documentation at:
/ ~4 _ n- F, y& ygyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
' b- n' s; B* l+ m* I3 l, ]gyp ERR! find VS **************************************************************
) L. k! v& i! W/ egyp ERR! find VS
/ l! x5 K) H9 ]8 Kgyp ERR! configure error1 V. J+ E S& Q6 @1 D
gyp ERR! stack Error: Could not find any Visual Studio installation to use+ J$ h3 \" f9 D, D
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu9 ]6 S0 A: Z( h9 U5 C
dio.js:121:47)6 n$ o: c) h. W, E+ [6 Y* X+ I
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
1 W4 K# X; S# c- Z9 `( @5 w* J7 Mgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16. f1 \5 |( ~# l# Q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
$ v1 s4 X: f8 Z( b8 @. t) Kgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16, Z3 _" X8 R1 ]; m1 f
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
# X' n- W) o4 O5 Wgyp ERR! stack at ChildProcess.emit (events.js:315:20)
5 l4 o& H; |" A2 Ygyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
; f* M- f' s2 ^4 j4 @( ^6 }( ?1 ~gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)4 ]0 W; Q2 P2 r* x# p3 b
gyp ERR! System Windows_NT 10.0.15063 ' E4 Y: r. m5 l Y2 E' m
/ @& g; K/ I, E; A" \& v3 L
解决办法' Y2 @7 x; S) c2 g
1、卸载nodejs重新安装一遍
! y( _2 ^: N! d- k; f8 d( z
* }( y8 h" q P' w {2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org) u$ Y7 f& ?( K* d
- q0 ?. G8 V- y* {3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools/ W! G# \7 C7 d8 h _& g+ H/ e
————————————————
- g7 {# f7 d o& W* K6 x版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。. g6 P9 {: ?/ m
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|