|
|
报错信息:" v1 H3 h( ^" g
```bash
. v( w' }4 a: M' ?+ x* ugyp ERR! find VS
; d R( x5 W( N) P1 ogyp ERR! find VS msvs_version not set from command line or npm config
7 Z+ S1 R" y) S& d2 U/ Z" }gyp ERR! find VS running in VS Command Prompt, installation path is:
# S/ A, Y& w( {gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
) m4 C* _9 Q' ^gyp ERR! find VS - will only use this version2 m2 X+ g3 C$ r% ]) l
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
9 T" d& \8 x9 p# W- dgyp ERR! find VS looking for Visual Studio 2015
4 F* o+ z' ]) zgyp ERR! find VS - not found7 p0 X% O% d' O. H5 ~+ w. r' T: m
gyp ERR! find VS looking for Visual Studio 2013, U- X; ~" a( O2 y. @' J: L" s
gyp ERR! find VS - not found, o) G* x2 u% o6 c
gyp ERR! find VS; E: F# ]% G% |/ v+ t4 i
gyp ERR! find VS **************************************************************
9 e5 F/ \, S6 d( ]gyp ERR! find VS You need to install the latest version of Visual Studio
% M# V1 h0 p v+ F$ B9 J; k1 I8 Egyp ERR! find VS including the "Desktop development with C++" workload.
! h3 j! Q0 ^! {4 n3 K% o% R* ugyp ERR! find VS For more information consult the documentation at:
/ _) g' R9 U$ o7 s! a' p5 Tgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows! v/ r1 Q9 e$ j$ Q5 ?6 ?
gyp ERR! find VS **************************************************************& `0 C$ p3 v5 ]/ j
gyp ERR! find VS; f/ S- M1 s9 h$ D: Y+ h @
gyp ERR! configure error
0 {4 R, E" U- {! ^3 W1 a9 {$ Sgyp ERR! stack Error: Could not find any Visual Studio installation to use
0 b& {6 e! `5 Y0 hgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu. b9 ^3 O# [; d* j8 T; R: r# }
dio.js:121:47)
6 r& r+ S2 ?1 e: E1 C, mgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
& \' C3 S; @# @gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
% D6 m6 L! {* Y6 d3 T& s1 ygyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:74 \5 s7 g. v8 H7 O$ }7 Y( G0 O0 l0 _
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
6 P6 }- c; c, a( _' G# sgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
9 }2 W; @! {( i4 D) `( Cgyp ERR! stack at ChildProcess.emit (events.js:315:20)
& D: H8 ~ B) ^) [gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
* H, E$ `0 F% N4 h, r& J hgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
1 u- R; R/ d" f# x2 f$ Egyp ERR! System Windows_NT 10.0.15063 + \( n) O2 n- S4 _9 a8 o
1 W5 M1 g" ~5 A& [( r; i& E3 O解决办法2 y5 O8 t3 K0 a* ~
1、卸载nodejs重新安装一遍0 f, R. _7 Y/ L
( _9 z1 k9 ^) i' {* H3 b
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org/ [" y- Y/ y/ T& ?# b% `
) F& S- A& U, \" s/ G3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools% A1 c/ {! E8 p$ e: a8 j
————————————————
4 H/ X: | W; @4 h3 t版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。. u5 P" S4 P1 g, c: ^
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|