|
|
报错信息:) F. l- Z; _3 z. r
```bash$ H* T# l1 s$ j( R0 z
gyp ERR! find VS
6 v8 W9 W; H5 ngyp ERR! find VS msvs_version not set from command line or npm config' a& J# v, {6 `
gyp ERR! find VS running in VS Command Prompt, installation path is:& v) A1 E$ q8 W" y
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"' }* Z5 @8 E3 f, r/ f7 r1 A' ~
gyp ERR! find VS - will only use this version
7 V" g+ k6 B5 {' V0 M: i) t$ G3 Ogyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
/ I2 a! }2 ?: r* \# sgyp ERR! find VS looking for Visual Studio 2015( H# ]5 {2 i& s' i0 ]! P
gyp ERR! find VS - not found
3 ], \/ a8 u: h6 agyp ERR! find VS looking for Visual Studio 2013; A( H% }! {" l8 i, L- u
gyp ERR! find VS - not found- s; v* [- P2 n* C% Y
gyp ERR! find VS
, K; T! O7 a9 e5 `8 bgyp ERR! find VS **************************************************************/ C, c8 ]8 W, R5 H E
gyp ERR! find VS You need to install the latest version of Visual Studio
* J) c% Q9 Q1 R$ s0 g, R tgyp ERR! find VS including the "Desktop development with C++" workload.% Z2 c2 ~. o0 ?8 _) y
gyp ERR! find VS For more information consult the documentation at:
8 n% @3 k+ X* g9 Mgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows* `) a2 q; \- _$ A9 L
gyp ERR! find VS **************************************************************/ ?; ^5 @- c/ q) r/ g4 M
gyp ERR! find VS9 I% g$ N. {% _2 q0 s
gyp ERR! configure error7 F9 v1 S/ F* W, E, b3 @# V4 h
gyp ERR! stack Error: Could not find any Visual Studio installation to use2 b4 c0 b, |. I0 e+ J; O8 `+ O
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu8 E% u- \$ S# `4 T. m& a$ ~, T. N
dio.js:121:47)$ A& Z. ~2 l" U5 q% g' l
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:161 B) Q0 Q$ z. f0 L9 r4 ~
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
1 f; g6 }' d2 U. Ogyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7' o7 ^8 h# f8 i1 s2 K
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16& D7 H* Z+ H8 j* x' u2 u' e) {
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
5 x O9 T* A- |5 V, t! Egyp ERR! stack at ChildProcess.emit (events.js:315:20)
+ g% h. o$ Y6 f( b F8 l+ \gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
- |( @6 F6 U2 ~: t @gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)9 V4 T4 ]4 o8 r; u6 h
gyp ERR! System Windows_NT 10.0.15063 9 R/ {/ M# X( g$ t; @% J+ R
4 g# w U1 x4 Z1 E; T) t' a解决办法- U* _6 w/ l' H# p
1、卸载nodejs重新安装一遍, v: N) C* @" O
9 {) q2 s/ T$ M- N
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org4 H$ H! _, E8 K3 [$ E
: j3 G# t* Q) t+ p- a4 Q3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
# C; Q2 L: f6 C; i: ^& U: o————————————————
; Y7 A. g( `4 R; o; |. s2 l版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。( @7 y0 ^# I. ?- N2 d% \
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|