|
|
报错信息:; _' v. H0 {( K& T3 S
```bash- y6 w9 c- h- a
gyp ERR! find VS
4 [6 @# a- ?- f0 F& n$ Fgyp ERR! find VS msvs_version not set from command line or npm config7 S* t8 \+ s& v2 {* F/ q' N: A
gyp ERR! find VS running in VS Command Prompt, installation path is:5 f r t/ ~9 y E2 n$ k3 f( ^
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"' t* O1 P ^" { g' x
gyp ERR! find VS - will only use this version
8 Z1 n Z' E' m. cgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
* N* _2 ]9 V' x, t5 ]4 |, T% igyp ERR! find VS looking for Visual Studio 2015* E! b+ I" T, Z2 i
gyp ERR! find VS - not found
9 T/ t$ t" Q2 W' {gyp ERR! find VS looking for Visual Studio 2013 u$ P# d6 q" e9 E% g) l$ I- ]
gyp ERR! find VS - not found
% n# D8 s* L" ?6 g7 x kgyp ERR! find VS
9 ^7 E, h& l" K- U; |3 u7 ygyp ERR! find VS **************************************************************7 A" k% L6 q: ~. s8 ^
gyp ERR! find VS You need to install the latest version of Visual Studio6 j! M' t1 ]" f7 d3 m5 h6 y( |" I+ ~! `
gyp ERR! find VS including the "Desktop development with C++" workload.
( }% V3 X# }+ j1 p; d: p1 O4 S" i9 U5 Q9 l0 ?gyp ERR! find VS For more information consult the documentation at:, L" C( a1 R) a% D) Y& s) T5 } F
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows: t1 m t; V5 t* w
gyp ERR! find VS **************************************************************
# W, w3 p: G' D1 h' x7 I) \! dgyp ERR! find VS
7 v) D {) Y) j$ hgyp ERR! configure error+ [$ k5 S0 j) w
gyp ERR! stack Error: Could not find any Visual Studio installation to use | y2 O8 n' ~6 Q& c5 I
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
) k; }* @* G1 m3 Z$ g! jdio.js:121:47)
, Y6 n( M+ {2 h$ Ngyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
+ [/ N8 O: }, J& C/ Z# R) r: W* ngyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16: E2 w& U% r1 P" k) }% k' C
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
# m, j+ k2 o9 A( O" U/ H0 ogyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
( W5 D3 y$ B8 |' Fgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
# l1 z5 [, c; G, f# cgyp ERR! stack at ChildProcess.emit (events.js:315:20)
: q# G. d- P4 X7 z( `$ y9 Sgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)+ j0 A+ }% c" |. Z" {3 a& @2 c
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)- @$ D: T2 {. U, o3 B7 P
gyp ERR! System Windows_NT 10.0.15063
9 Y: k$ x+ }! f( `' Q& g* A$ V* c& U$ s- e* \
解决办法4 k- r3 a6 b( z) `% a2 e9 l6 v h
1、卸载nodejs重新安装一遍
# n8 J# k3 Q7 `
% E; U& v( w3 m" \. r2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org8 Z K9 _; M' O2 @/ K( o
# H2 c- [: ?$ I3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools# Z4 N |# l6 ~: q2 n
———————————————— v2 O& w: }- |) b
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。( ^2 O1 J* Y* V& A# `3 H+ j1 _6 ]( c
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|