|
|
报错信息:
# k: t* O. G+ Z G6 d```bash
; U5 J3 ~" H6 |- ugyp ERR! find VS
9 O4 H! |7 z) zgyp ERR! find VS msvs_version not set from command line or npm config* _9 f' h* g3 D' p( [
gyp ERR! find VS running in VS Command Prompt, installation path is:3 C0 z7 f6 I. D% c& N
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"2 B; k0 g* K! E) N. U
gyp ERR! find VS - will only use this version8 {' {. U! U/ a8 d" C
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer4 b( T6 a5 F1 O, A4 ~
gyp ERR! find VS looking for Visual Studio 2015- g* W* L( |8 U/ f8 L! g
gyp ERR! find VS - not found1 z1 T5 {6 f) z3 W3 Z) h2 V
gyp ERR! find VS looking for Visual Studio 20136 R0 D2 q0 R1 S5 D
gyp ERR! find VS - not found1 O% g$ @4 D+ u, m6 V
gyp ERR! find VS! q' W% Y8 h0 X/ m# _) Q. m
gyp ERR! find VS **************************************************************5 z' |" \( x o7 p- k
gyp ERR! find VS You need to install the latest version of Visual Studio2 R% N4 }- z( ?) b, j; t' r
gyp ERR! find VS including the "Desktop development with C++" workload.
! v" N4 v1 V( J( {( Ogyp ERR! find VS For more information consult the documentation at:- l1 a$ P4 r4 P C' s* S
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows' Q9 G1 a) i9 q1 E: E8 P" s
gyp ERR! find VS **************************************************************
4 u+ a" v2 w3 c. G7 \gyp ERR! find VS2 y! _8 `. k* o: u; P' J" m- ]
gyp ERR! configure error" R+ X+ G8 @( J( X$ a/ U
gyp ERR! stack Error: Could not find any Visual Studio installation to use# _$ v; {$ f, d- E! N
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu9 Y8 [/ @, ^8 J/ B! R
dio.js:121:47), [2 |# z2 h1 d, k6 t
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
/ L5 f" F4 ^, }" e# jgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
% c/ y) j) E; t+ [0 X! Vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
; u3 o5 ]( q' t& F' r5 o! \8 N3 D9 rgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
5 m6 ?' ?8 L; _, [% Vgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)& h3 p3 u4 w6 w% s8 `; c) D
gyp ERR! stack at ChildProcess.emit (events.js:315:20)9 N% I7 U( o& y9 {% L
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
* |0 H8 z1 a" W" ggyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
) T* @- \. W' p/ g2 F" R# O& Fgyp ERR! System Windows_NT 10.0.15063
. Z* }* S# Y A5 N
& F& B$ P' X1 I解决办法
. I7 Y0 w6 E4 M% w1、卸载nodejs重新安装一遍
) ?7 b/ ?8 B( d: m
4 y9 j c2 v5 {# Q' l% a7 q! l2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
' {( L* A2 B3 z. m$ h" @* Q& J8 y* `' g8 t! S7 s2 I
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
9 K( h, {$ `% \————————————————. V- r. r+ l4 j# ?6 m; [2 M
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。2 f. }( f' u2 Y9 a- v2 L; M
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|