|
|
报错信息:
3 K( M' v5 D2 o+ p, W6 J0 K```bash8 E3 ~: G2 k1 K- y7 {' e
gyp ERR! find VS3 G. }4 s3 K5 \ @9 _: U
gyp ERR! find VS msvs_version not set from command line or npm config% r* I6 R& [! K! q& w7 H% ~
gyp ERR! find VS running in VS Command Prompt, installation path is:; f: c8 }2 }! v; W9 h: d
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
3 R9 `, t7 z" ?2 Qgyp ERR! find VS - will only use this version
; p) W( k6 m0 X5 W2 Z. tgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer a* A( @; l2 j+ P+ r; D% F% h
gyp ERR! find VS looking for Visual Studio 2015
- R5 f, L" s5 E: w. a9 Cgyp ERR! find VS - not found
" B C: C3 Z& E+ {) {$ q1 E" Tgyp ERR! find VS looking for Visual Studio 2013( S/ k1 k9 p4 e' A! x! L( Q' {
gyp ERR! find VS - not found5 G3 z. u) }& s8 @5 C- m8 v
gyp ERR! find VS8 C, T: U: i9 T1 W
gyp ERR! find VS **************************************************************
/ N; D( ~! C P fgyp ERR! find VS You need to install the latest version of Visual Studio
2 j( L3 Q/ D3 l( C6 C2 L( P r3 [* Xgyp ERR! find VS including the "Desktop development with C++" workload.
2 t+ ~6 r z$ ^! _1 _gyp ERR! find VS For more information consult the documentation at:; g7 ~7 k% T+ f' k
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows5 `' |, R+ A8 `
gyp ERR! find VS **************************************************************
5 D8 p0 D; z# V$ h1 D2 `5 lgyp ERR! find VS" Q$ q, R, z6 t" K$ n" V: t
gyp ERR! configure error" p' E$ M' I) k6 O- @* u
gyp ERR! stack Error: Could not find any Visual Studio installation to use7 T$ l: P' }3 D' r2 |1 I6 V( O
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu0 Z* A2 ?( `' u, X5 _6 |
dio.js:121:47): g! `6 \6 O" k; j) V. Z6 ~" g4 c
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
4 X, M) L" J2 w' a) }; jgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:160 j; K3 l1 I5 Q2 U; [# c1 l; A3 d
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
; W/ z& ~. r2 n, O' w- G3 Kgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16" ~4 L3 A% [( E# A* L; C
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
8 {: ?7 `; {& p0 jgyp ERR! stack at ChildProcess.emit (events.js:315:20)
4 p4 }9 V. f- ?6 Tgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
+ ~0 N) P; ]3 j9 @0 b5 f( d" Q' Jgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
5 J" V8 [+ {: rgyp ERR! System Windows_NT 10.0.15063
& _! K( a- j [' g% {0 X
2 Z' X( ^8 C1 b: ~解决办法9 ~: s( | z8 b1 ^/ A* v
1、卸载nodejs重新安装一遍
' }" _& C1 ^4 b: X$ t# S" z. E6 ]' t) Y- b# I, O8 F8 }# [1 M8 K; I
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
+ Q a( s$ W ^! Z3 u& V: V" X/ e5 f
* y a& K E3 P4 [+ G, Z( \8 ?3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools% Z0 E( D7 y h7 @5 |7 s, n
————————————————
' F- L ]. z) x0 z) Q8 E版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。: j3 P: ^ ^$ C- x
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|