|
|
报错信息:
0 e2 O, }, J8 P2 L2 u- i# o```bash( g# }1 b! W7 }5 D% n
gyp ERR! find VS- e/ H$ l4 [ }' K
gyp ERR! find VS msvs_version not set from command line or npm config
: {# I% B( i) [ z2 _- `gyp ERR! find VS running in VS Command Prompt, installation path is:% }4 u, `8 M6 I$ X' a
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
5 l, l$ _& Y# n8 g1 g3 O& \$ zgyp ERR! find VS - will only use this version
7 P" \% n/ m3 g6 j' Ggyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
- \" S" R% ]3 X) j* z, Cgyp ERR! find VS looking for Visual Studio 20151 h3 `- Z2 F7 Z2 J
gyp ERR! find VS - not found
( o) x$ ^: q% u8 f% v0 Bgyp ERR! find VS looking for Visual Studio 2013
. M, ^0 G L6 z" P+ x7 k2 Sgyp ERR! find VS - not found
+ w* {: v3 P' ~1 Y/ C$ S2 tgyp ERR! find VS
) E/ S* r# N# ?gyp ERR! find VS **************************************************************, `) ]7 h! X- } r( S5 R
gyp ERR! find VS You need to install the latest version of Visual Studio& G* S% m& Y: r1 i- X
gyp ERR! find VS including the "Desktop development with C++" workload./ i6 e' o: g# U$ X+ f [
gyp ERR! find VS For more information consult the documentation at:& S3 Z: }- ~8 m- ~ R7 Y, j
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
6 F; k! I/ H* R. Q7 Sgyp ERR! find VS **************************************************************
: @/ m3 m; Q9 n R: P" Ggyp ERR! find VS4 p9 c) |; O6 l) a
gyp ERR! configure error
9 k9 V8 C' b8 U# ]gyp ERR! stack Error: Could not find any Visual Studio installation to use4 d9 G% W, r3 `6 s ^' w
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu$ N$ T6 ]7 v0 O7 B+ p% f/ j
dio.js:121:47)2 U* i2 x9 H: b* T0 n
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16- j# L/ K. a; i0 j- m, H8 j9 ]
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
2 g1 u+ j# N5 E& s- J) c/ L, f& |" pgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7# [/ B9 _, s+ @4 C6 k( {6 ~, L( s' a6 v
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16" [& e8 o% { o5 J/ t- F9 m
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
6 l& N( A! }' dgyp ERR! stack at ChildProcess.emit (events.js:315:20)
# i6 V. b2 G; L/ q9 P. Jgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
2 i9 i- W4 G2 M3 ggyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)8 `$ o, N& }7 `* o
gyp ERR! System Windows_NT 10.0.15063 f( \: |& K7 f& P; c4 S: e3 f" F2 u8 e
I& p* w3 q( K% R解决办法8 ?# i& y" K) [4 d; D3 M: D* @
1、卸载nodejs重新安装一遍
( Z! [1 Z5 t& J! v3 r
- H3 u* r" ^. o; g* E0 x2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org0 L+ }0 L6 m) Q5 z
Y$ {2 B5 @. o9 d* J$ p
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools/ B9 {, K' s/ M+ f2 [: y
————————————————
8 b w' E* \4 f1 R版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
, }$ `* Q/ s5 |5 n* g原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|