|
报错信息:6 i! y% g& F* \# r* c
```bash
9 F; m* d% z% e. P- wgyp ERR! find VS8 W! U: b& @- ]4 s, G0 F" {7 V
gyp ERR! find VS msvs_version not set from command line or npm config, d4 A. f. t/ q O2 [
gyp ERR! find VS running in VS Command Prompt, installation path is:& |2 e) Y! Q( }! E0 V
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
+ k e, h1 p7 U% zgyp ERR! find VS - will only use this version" Y) i; z$ B! @; F
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer i+ e; T( U2 o9 l! ^* w5 x
gyp ERR! find VS looking for Visual Studio 2015- C5 x4 k7 h, P3 ^7 f
gyp ERR! find VS - not found
: j6 b# d8 O1 B4 v2 T- ]# t* b0 rgyp ERR! find VS looking for Visual Studio 2013! Y& C ~6 ?' ~+ @# d X
gyp ERR! find VS - not found
3 i- B2 n; N* Agyp ERR! find VS
! T& \- n' G: O" M* ^0 Z4 A5 r% Ugyp ERR! find VS **************************************************************
+ g1 W7 ^! X- ^/ N3 ]7 r; Tgyp ERR! find VS You need to install the latest version of Visual Studio
) B F' c+ _. M: |2 M F# o2 F! Pgyp ERR! find VS including the "Desktop development with C++" workload.
' a! m' D8 H* M. c) o3 h! ugyp ERR! find VS For more information consult the documentation at:+ I# x- N% \- n) ?3 o4 \
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows. M( N5 F" f0 n! u; b
gyp ERR! find VS **************************************************************
" f r3 H V4 A6 v+ D# Ogyp ERR! find VS
6 ~) j1 J; J0 S3 `2 c5 xgyp ERR! configure error/ B& K1 ^% `' h& S' A
gyp ERR! stack Error: Could not find any Visual Studio installation to use
# ]6 S/ ?" @$ b( O2 ~( v# lgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
|( y6 a3 A: e9 Bdio.js:121:47)) n9 g7 i; \/ R5 ~$ w/ [- w
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16% E1 `$ J# b$ |
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16& c* x' {/ E* D7 W, @$ b6 T4 m3 S* i
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7, p6 P m' x* o# t! k3 r" O0 e
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
' u M& V$ ?( dgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
; g# r8 R t0 Hgyp ERR! stack at ChildProcess.emit (events.js:315:20)
: l- k6 p, G3 r* g: q, [' y: Lgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)8 T8 B; @- `# M) V9 I, M0 m
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)' j8 H( L6 f9 |& W0 z# T- f" Y! a
gyp ERR! System Windows_NT 10.0.15063
, U: W- _; m6 ]: I" }' P) a* b0 z" p
解决办法0 |; h$ A' n' K+ x# R1 _ x+ I
1、卸载nodejs重新安装一遍/ o! k$ C t% A& A; c% O. Z
h3 J7 j; j8 x: T1 }2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org y# I9 P+ i' s- v7 A6 Z
8 l) G0 o2 h5 T2 ]6 R6 R6 \; L3 Y3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
) |) O! G$ m2 X) Q6 |% a- `( [: N————————————————' j" w: j" l5 g
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
+ t& W, K1 ?; a原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|