|
报错信息:
8 J+ |* d! V" ?```bash4 ~ i% C% X9 I8 Z7 o
gyp ERR! find VS3 f7 c v O% G+ ^/ {6 I8 E
gyp ERR! find VS msvs_version not set from command line or npm config
- p! o; @! [4 c9 A% Xgyp ERR! find VS running in VS Command Prompt, installation path is:
0 s% f! \, m' Ggyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"( l2 _2 u9 o/ D' y- t
gyp ERR! find VS - will only use this version- {* S" @4 X1 D
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer/ `! p% ]: W' ?- n
gyp ERR! find VS looking for Visual Studio 2015) i) S4 G; l- j0 H2 H" Q4 g8 I$ M
gyp ERR! find VS - not found
% [" X6 X! ~, Z# Vgyp ERR! find VS looking for Visual Studio 2013
4 s) p5 m2 A) R4 s0 q9 B# ugyp ERR! find VS - not found
4 q9 Q' k$ a1 g8 r: f& m. }1 Ygyp ERR! find VS
) n( ^1 ]) p7 ?0 S% f/ M# Wgyp ERR! find VS **************************************************************- L5 H5 Q. I0 }6 ?5 ?
gyp ERR! find VS You need to install the latest version of Visual Studio
7 d- f: y4 D" L/ y+ H* xgyp ERR! find VS including the "Desktop development with C++" workload.
7 w( f# Q2 O8 R3 R% Qgyp ERR! find VS For more information consult the documentation at:
3 h' _8 d; s( i# |3 E& ^5 S7 Bgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
+ k. i6 F( j& h, ^9 pgyp ERR! find VS **************************************************************7 j& ~. B+ Y4 o; g m3 v
gyp ERR! find VS
T [0 \6 z i9 qgyp ERR! configure error/ \4 Q3 Y9 t: H) r
gyp ERR! stack Error: Could not find any Visual Studio installation to use3 W" h) `, F5 b9 x# u8 ]- ~
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
7 w5 Q0 r: I4 Q: C/ O5 Pdio.js:121:47)" V! x0 u: t# O# c
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
0 C! N( A) F" m+ ]. a, a+ c2 F" Cgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16! p! h& X, n1 z% M
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
9 a, G# S2 k" u H- J1 f8 fgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
4 V1 i4 v% H/ U- R" `+ ugyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
% L& i+ r8 ] [# y* N a# O( d& _gyp ERR! stack at ChildProcess.emit (events.js:315:20)" r/ n5 M' s% O$ [ x
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
q& s2 y2 A, O' D) X, k) sgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)4 `, k3 ?8 A& t% Q
gyp ERR! System Windows_NT 10.0.15063
- g2 J! `6 v; A2 _# U( A% D5 t3 x/ X) y/ X5 k7 ]( k; O
解决办法: e9 I4 W9 f+ H( \2 z ~
1、卸载nodejs重新安装一遍
: @, C, I& D2 |$ S, o" p5 d* i3 [# n7 N0 j" \7 \( u8 ?" z
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org" l/ F' F# L+ G6 S& l+ W8 f9 b
; s1 H9 c! h- r) U' T. I! d) A3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools, h+ |+ B" `4 z6 m
————————————————
' `0 O# C3 R1 u6 w: ?版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
; V4 K) G* l( J* D原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|