|
|
报错信息:
0 Y0 {! \( n, h8 b```bash
9 K# G: f1 H1 X$ agyp ERR! find VS
8 f7 |! Z8 k) y: r+ [" Igyp ERR! find VS msvs_version not set from command line or npm config
$ ^ g% m9 C% u0 v7 X& L3 m! sgyp ERR! find VS running in VS Command Prompt, installation path is:
; i5 Q6 W% Z' L$ e5 `5 Qgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"6 q( _# ~) }9 @% Q
gyp ERR! find VS - will only use this version' e5 Z" W7 c" ~1 m" X
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
- q8 V. w! }5 E$ A3 W: Mgyp ERR! find VS looking for Visual Studio 2015' [$ I- K( }( v# Y ?, c
gyp ERR! find VS - not found
, [5 l2 {" Q3 E4 S3 j6 Lgyp ERR! find VS looking for Visual Studio 2013
! ]& _* r" {+ r+ }. S, @$ Y. E/ agyp ERR! find VS - not found% g0 l# @4 f9 b# e
gyp ERR! find VS! f) @5 ^5 u2 y' {6 {, B8 A3 ?
gyp ERR! find VS **************************************************************
( {- U& a3 p6 q& k) H' o7 l3 Ngyp ERR! find VS You need to install the latest version of Visual Studio; z, b7 z9 \& o+ W3 n
gyp ERR! find VS including the "Desktop development with C++" workload.: X, }- i$ V" N5 L% O4 r" r/ A
gyp ERR! find VS For more information consult the documentation at:
; v+ a" F/ ]" t% `5 q$ d* Qgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows% v# A# p# U/ }2 A& w$ b
gyp ERR! find VS **************************************************************+ X+ y6 `; H/ `7 _- N6 ~' k
gyp ERR! find VS
4 B( C' Q! H. I% C/ P0 } j8 Fgyp ERR! configure error3 u) B2 X2 k9 E' b. t- u% U
gyp ERR! stack Error: Could not find any Visual Studio installation to use& `) g( @" |; R1 n
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu) Q J4 ] @4 |- A9 {( q# q
dio.js:121:47)7 {5 I; V& o" K- S6 D
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
+ u8 ?! f) A5 j, V% [* Y+ ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
: |( _: ^4 W S2 |gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
# `! Y6 H+ D9 K( o4 T n, mgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16 Y: Z O& ]6 O) a Y* d
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5): F+ g4 |0 W' x4 p5 {
gyp ERR! stack at ChildProcess.emit (events.js:315:20)* _3 _1 S: p- |3 W; V+ K$ s
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
6 k: O, Z) z! |. W: sgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
" n' A5 J! }3 E, a+ x6 Ogyp ERR! System Windows_NT 10.0.15063 8 n- D6 n. h7 m
P' i8 c2 J. H5 K: \: ^, W
解决办法. H1 Z: ~" E r
1、卸载nodejs重新安装一遍0 E% t7 g _4 f6 c
8 s% C8 t4 \4 ]5 a& a" B. Q' w, H2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
) f4 P4 s. `$ v5 \" M8 I* ? B8 |: U h& p( b7 o) R2 ~! r
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools- H* H# G$ O5 ?+ @ C8 F* P$ |
————————————————
* I0 f6 ^# p. o' R* H版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。6 T o) A4 {0 w1 o
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|