|
|
报错信息:
- k# F# R3 k4 O D5 n```bash
8 y! H0 y+ J- T$ Mgyp ERR! find VS. U v0 i' M) T0 y) X6 } q4 s
gyp ERR! find VS msvs_version not set from command line or npm config# j1 ]6 g0 i: f5 P/ C! B
gyp ERR! find VS running in VS Command Prompt, installation path is:
4 k+ }1 V3 n/ X0 o( Vgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017". w3 L4 b) T; I ^( N; m
gyp ERR! find VS - will only use this version |9 w0 P9 W2 u% g) m
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
8 R3 t5 l' x+ m* [- p Zgyp ERR! find VS looking for Visual Studio 2015! J. [4 H% W# s! t
gyp ERR! find VS - not found
" X& P' E2 k' Y' p bgyp ERR! find VS looking for Visual Studio 2013
+ n- ?2 I5 X2 u- q, |1 P. Dgyp ERR! find VS - not found6 Y9 Z" A9 b: K$ O
gyp ERR! find VS' `: |2 G5 G; l0 A% C
gyp ERR! find VS **************************************************************
0 A( c. s6 L. t; }' G; _2 Tgyp ERR! find VS You need to install the latest version of Visual Studio
: P' _) ?7 ^/ b7 @gyp ERR! find VS including the "Desktop development with C++" workload.; x; T+ U+ j8 J
gyp ERR! find VS For more information consult the documentation at:2 d0 {; l- u# `$ V7 Z/ m
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
. B5 V' U# {+ bgyp ERR! find VS **************************************************************
$ n: h# r1 \' W, q; zgyp ERR! find VS/ z1 H& c9 \7 _2 Y4 s, r
gyp ERR! configure error
5 H+ V* |" Y8 U( E; hgyp ERR! stack Error: Could not find any Visual Studio installation to use O" U8 t$ m1 u5 I$ t
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu( |8 p @) a) ]6 {5 U( r/ M* _
dio.js:121:47)
! J+ B3 y* H7 p/ n6 a; igyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
; s$ \- J( Z5 }( C* ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:168 i+ S) }# Z2 U) J
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
4 S* U# G: O6 egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16 U/ B1 `2 W6 O; p) k$ J4 d
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
# h5 R9 ` e, Sgyp ERR! stack at ChildProcess.emit (events.js:315:20)
3 s, p* _" A/ A- d2 `9 qgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
/ k( G7 Q1 m' G: V& Wgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
6 d1 U N s6 h, ~2 t8 H+ Fgyp ERR! System Windows_NT 10.0.15063 1 D$ y+ W: M6 |0 o4 R' t5 P1 O
3 S# h. l$ B0 ?5 b# d* F/ W9 y
解决办法8 K( d* O) z( e7 Z: S
1、卸载nodejs重新安装一遍
8 M) q2 f0 E9 q2 X& v' s9 |; S- x& F" n) Z, @" u
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org& V( ?4 S% n6 G
: }- T: y9 O% I# g3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
% y- H Z7 F. L' [————————————————- J$ b' f4 l$ i4 N; n4 m$ F# W, s t
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。/ w% [# c# Y- H8 z; ?. [4 k
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|