|
|
报错信息:8 W8 F6 F2 d! N& C
```bash
. ]* |! L% J* Ggyp ERR! find VS8 r$ S, W; e6 q2 v
gyp ERR! find VS msvs_version not set from command line or npm config
! m9 I# e9 ?3 y8 x3 Ogyp ERR! find VS running in VS Command Prompt, installation path is:. F) m% l6 X- F; F: l2 z
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"( E8 n! w# U4 F H
gyp ERR! find VS - will only use this version' U( B9 Y2 N$ S1 K, ^
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
% `0 V. I% E& j o% ygyp ERR! find VS looking for Visual Studio 2015
- v3 \% ]3 \. p E" Kgyp ERR! find VS - not found
1 ^7 z' l- b' ?% M# A) j' A4 Egyp ERR! find VS looking for Visual Studio 2013- k3 k! o7 U* g: W Y8 Q0 e
gyp ERR! find VS - not found
& o# v/ ]" O: \: X& B' n! jgyp ERR! find VS
) b+ W: V1 a1 z7 ~/ Tgyp ERR! find VS **************************************************************
5 P, g. d; ?$ l/ _gyp ERR! find VS You need to install the latest version of Visual Studio
4 b5 @. ?: s6 x. pgyp ERR! find VS including the "Desktop development with C++" workload.2 h8 Z6 O. r5 I5 m5 g) k! q, f
gyp ERR! find VS For more information consult the documentation at:
9 _: y: L5 }/ fgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
4 J# d# d3 c8 \( b. ogyp ERR! find VS **************************************************************6 o1 Q" U9 R8 n2 Q8 A( r* l
gyp ERR! find VS/ a) ?9 i r3 [4 V9 V6 m, E
gyp ERR! configure error; P/ i$ C! A) K6 K5 m
gyp ERR! stack Error: Could not find any Visual Studio installation to use3 L# r/ `% v( V* a
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
) m! y9 Z p2 d+ m0 Odio.js:121:47)4 T+ z3 t6 ^: q8 k( Z L g5 t0 a
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
5 j8 f3 J, Z! K$ d6 lgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
8 Q0 \: Q+ a' Z8 H$ xgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
. _$ A4 A1 o0 U* Hgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16) W. K b% W7 X+ c7 o' ]' C
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
: ^' v7 m: K$ o# y: vgyp ERR! stack at ChildProcess.emit (events.js:315:20); D5 |8 P- K. E% D0 Q- V3 p0 R, S
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
' ~! b1 f' k: f: h% o! Wgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
( M& h! r- v% o1 xgyp ERR! System Windows_NT 10.0.15063 % J+ N. X9 l; G$ q8 n$ z0 S
- z( }- F4 f9 d) I: Y6 y1 ]2 c
解决办法
, Z! R% V/ b$ {, [5 u: }9 K1、卸载nodejs重新安装一遍5 n1 A1 S1 M, {
G. ^4 m" A* y/ Q4 d2 Y. Z2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org4 l, h# L% T9 ~- B
9 J9 ]5 u3 p6 C+ j8 \
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
3 @! a0 ?" h2 @( u; W5 h% G————————————————' {4 I: R, P1 t4 J3 I7 j
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
( v; @+ ~# P5 I' t$ d# t原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|