|
|
报错信息:
8 l, ]+ x7 q# p4 w7 i4 n```bash1 k+ Z$ @; y' R0 O% c$ }
gyp ERR! find VS# X$ b+ D1 ]: x) Q# }! M
gyp ERR! find VS msvs_version not set from command line or npm config
. {5 @% ]) Q- h( K. i q. ggyp ERR! find VS running in VS Command Prompt, installation path is:
: L1 I- i1 e: J8 F" N y6 Wgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
2 s1 q; z' T/ ?2 p8 h1 n8 vgyp ERR! find VS - will only use this version
6 f. Q2 Q9 F& zgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
! ^0 z* T" S- o5 L! \2 T" Wgyp ERR! find VS looking for Visual Studio 2015, h( M) u2 {9 a* ^ ?/ j: u. }
gyp ERR! find VS - not found$ H; ]9 C$ ~/ h" y0 u% v
gyp ERR! find VS looking for Visual Studio 20138 U' Z8 b, }+ y4 f) k" d8 ^. k
gyp ERR! find VS - not found5 z/ K( |' X: d
gyp ERR! find VS' P4 A. O" m o8 a# q) B
gyp ERR! find VS **************************************************************
M0 c( K5 e9 g/ a8 k: ?+ Bgyp ERR! find VS You need to install the latest version of Visual Studio
1 z8 D4 J8 E2 p: s6 q, Jgyp ERR! find VS including the "Desktop development with C++" workload.9 P0 t6 ] d4 {
gyp ERR! find VS For more information consult the documentation at:
9 t. e; \! a/ m8 E/ M4 e4 K0 z! Igyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows ^' f: V* Y4 _" M, c3 ?( \$ x
gyp ERR! find VS **************************************************************) Y& ?$ P2 L8 {( y$ Y9 h# X
gyp ERR! find VS
6 n' x* N0 k+ H, J* Y% ^4 ~3 ]4 kgyp ERR! configure error* c7 Y2 x) {6 a
gyp ERR! stack Error: Could not find any Visual Studio installation to use
- J( W8 w* G2 L- P agyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu O2 C0 n& [. F; T. u
dio.js:121:47): H; i/ c g# Z$ n7 Y
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
; Q" J9 P; c* a$ u" N* c; O. ogyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
1 k! S R$ \! h5 qgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
6 E9 }, H. g' ` ?2 x C6 ^gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
$ ]" M. A" h6 ]# ]- ?gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
3 C% D" M! m9 r k; a) }/ xgyp ERR! stack at ChildProcess.emit (events.js:315:20) p$ q5 ]1 h' z1 B7 R7 [4 R% u
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
: n* q; e8 h8 m% ]gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)! [! @0 b* T7 Y4 A' |# |/ y
gyp ERR! System Windows_NT 10.0.15063
& @5 S( D& L0 v! E* b' G8 P3 v; q% q
解决办法( W1 M6 o# q* J2 v4 T
1、卸载nodejs重新安装一遍
0 b) o* b) L6 X( J
5 L! O6 |/ `2 I6 g3 G% y! d. h0 \, j2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
( O! [( I4 z+ y2 {" e1 A
4 e; [) v% l+ E# x3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
7 E' V) I/ J) S/ Z9 x6 D( i————————————————3 B' ?" K- o; i. y/ s+ r+ d
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
9 @0 ~) I. J2 x; O2 T& N原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|