|
|
报错信息:" R3 ^; G" O2 @/ P/ h) R
```bash. Z% u% g, H: L' e' [
gyp ERR! find VS
+ s. J$ l* E% a( i" ?3 h) Igyp ERR! find VS msvs_version not set from command line or npm config/ h" X5 b' P) z! |
gyp ERR! find VS running in VS Command Prompt, installation path is:" S: g: R$ J2 O6 p. M
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"' N( K5 @8 r& T+ I/ Z' P" @
gyp ERR! find VS - will only use this version
/ G8 o% h4 c/ z5 U/ H* dgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer' W( l! H1 Z' d T4 o- j2 h- f4 k
gyp ERR! find VS looking for Visual Studio 2015
! H' E! H6 O/ G; {! M$ H7 ~7 [8 }gyp ERR! find VS - not found$ I9 H# \ G' ]$ H$ V2 \
gyp ERR! find VS looking for Visual Studio 20133 ]# g1 @6 c# N( H" K
gyp ERR! find VS - not found
9 P4 h* {; x) w5 h# qgyp ERR! find VS5 L% N! \, N7 x" @' S" Y% Y
gyp ERR! find VS **************************************************************
" c: j1 ?) B! G9 Igyp ERR! find VS You need to install the latest version of Visual Studio
: r2 i5 k% c# Tgyp ERR! find VS including the "Desktop development with C++" workload.2 Y, J0 t3 M+ _! G- y5 f) X, `1 Q
gyp ERR! find VS For more information consult the documentation at:$ Q4 F+ C: h4 H3 V1 K9 L- h# E# G
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows+ ?5 Q& X+ _/ c: H) ^
gyp ERR! find VS **************************************************************, a5 c, L5 g6 |1 }+ `/ K! a
gyp ERR! find VS
* r3 _4 s6 g: w# S4 z* q6 i0 Egyp ERR! configure error
; J; f% H/ z, Z) I% ugyp ERR! stack Error: Could not find any Visual Studio installation to use
- w; P9 @, m/ _" i9 [* h8 D) ugyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu2 U) k/ r, r: y* J* R1 D! H/ L
dio.js:121:47)/ S3 n# [3 N& P5 T7 u
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16! V, Z( \( v2 E- Q* \' S& |2 W
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
1 T' ^2 x5 u$ x% B' igyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
% A$ q- p6 d$ C( ?5 Ngyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
; o. E9 M# w4 i( q" j; B7 _gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
* t- M* p; r1 v9 Q" ?gyp ERR! stack at ChildProcess.emit (events.js:315:20)8 P7 F% z2 Y( s( o: n$ k8 q: ~
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16). p* y1 w( L+ n6 ^* l! W% H
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)4 O# z3 _. W2 U
gyp ERR! System Windows_NT 10.0.15063
) S4 z: W$ L1 G# v' Q( U$ U4 O: F0 n7 j
解决办法5 O2 u$ o, I" A3 L( N/ u4 G
1、卸载nodejs重新安装一遍
. q3 A6 T; Q% K' }$ z" ~9 a
+ j# G4 f/ |6 j g2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
' l9 l5 A" F) N
' ~2 ?6 K: \6 r) k& ]$ X' D+ B3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
% C' C" a. G' a4 l1 R2 d1 f+ i————————————————' X0 ]% c$ @, B e+ t
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
$ k# ]# `! O- Q6 C* q原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|