|
|
报错信息:( h# I4 R: o6 k
```bash4 L2 a2 M: Y' k
gyp ERR! find VS$ m% p, y. h. X0 o& B' u, }, x9 g" v
gyp ERR! find VS msvs_version not set from command line or npm config1 y1 m$ {2 F9 W7 A
gyp ERR! find VS running in VS Command Prompt, installation path is:! A; P p" Z" B2 @4 `: k
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
; ~+ [. J* a8 ?, Z; rgyp ERR! find VS - will only use this version
' t$ f+ G2 I! x! C( Vgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
1 v; Q, O z1 kgyp ERR! find VS looking for Visual Studio 2015
; w8 d# O' X& Q3 t$ Mgyp ERR! find VS - not found
. `1 `% x: X8 f+ D* Kgyp ERR! find VS looking for Visual Studio 20131 R+ ~- n" I0 F7 E# J9 D# i( j
gyp ERR! find VS - not found
" S+ t, h! ? i4 w( K- @- Vgyp ERR! find VS0 M8 a& u/ T+ O9 e; g
gyp ERR! find VS **************************************************************$ W# j* ?6 L9 t1 @. Y
gyp ERR! find VS You need to install the latest version of Visual Studio( Y7 u' C- {9 u/ [
gyp ERR! find VS including the "Desktop development with C++" workload.6 {# Z/ ^2 P% x9 o2 W2 ]# J
gyp ERR! find VS For more information consult the documentation at:
) l% C. ~! U% Z1 F1 p: c U: e! kgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows2 e7 J; Y# B4 S0 r+ e) k+ t
gyp ERR! find VS **************************************************************
% v1 r5 d' ?8 E0 Pgyp ERR! find VS
8 {6 ~. C4 E, y, @gyp ERR! configure error
. [: \# G) B' T5 \gyp ERR! stack Error: Could not find any Visual Studio installation to use- L, N9 ]+ k+ X2 D, @6 o' H
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu- t/ g1 W. U* F' _3 I6 a: q: w
dio.js:121:47)7 i1 `* ?# ~5 w- k9 \) x0 k; b
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16. X2 r5 Y2 Z1 I
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
7 \8 v: o* H3 ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
) R' n8 H" c0 @- \& o. v, |# S$ Ugyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16" M9 w' M4 z4 j* O7 a7 Z, P- i" n
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
/ o1 m$ H) X$ g- d$ C5 ^gyp ERR! stack at ChildProcess.emit (events.js:315:20)
* W8 J1 t! x+ p3 jgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)- Z! j! L3 \! c6 I0 R1 r
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5), Z1 n, p' ~9 k6 t; G& e/ n* }
gyp ERR! System Windows_NT 10.0.15063
9 k$ S3 {* G( m# h6 w+ v, ^1 Z* c( g$ n1 K" T3 [
解决办法
) w, J& |8 R& k9 A7 D8 {1、卸载nodejs重新安装一遍# ^( r0 g$ k9 g5 U
, E& O2 X9 x/ U/ h2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org) T8 w; X$ r+ i6 n ~
! j% `2 [" e5 g7 @8 z6 x3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
: _3 s# X% U6 ~7 _4 m————————————————- j& A2 \5 F2 @+ ^/ Y# m
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。- h% k- `* h' R' u! ]) F3 J
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|