|
报错信息:* k9 T; m# B' w9 m/ q5 N" K# @
```bash* f4 ^ \8 |# [8 r; j
gyp ERR! find VS- E, c2 W2 B# O
gyp ERR! find VS msvs_version not set from command line or npm config
Q, [8 O0 j$ o3 u; Zgyp ERR! find VS running in VS Command Prompt, installation path is:' }, t$ x) W& a5 o0 n7 C; b
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"* S) {9 ^+ _6 \2 Q8 R
gyp ERR! find VS - will only use this version
( v: I+ p8 t. B3 d" Y Cgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer) Y5 P' O+ O3 f! I- c1 A) R
gyp ERR! find VS looking for Visual Studio 20152 ]# y# ~. j8 _
gyp ERR! find VS - not found" i' R+ a4 b* @, M
gyp ERR! find VS looking for Visual Studio 2013
& m4 i' u" U6 m) V4 rgyp ERR! find VS - not found: L$ q! Q1 A5 a
gyp ERR! find VS
9 c1 J, `& [. b1 T/ ugyp ERR! find VS **************************************************************
) A! v, x3 ~* g" _1 ?5 y, rgyp ERR! find VS You need to install the latest version of Visual Studio4 C% X6 D& j0 G
gyp ERR! find VS including the "Desktop development with C++" workload.! q- ~! N1 O" J9 ?" r; p) H
gyp ERR! find VS For more information consult the documentation at:3 E+ C3 ~- f! t- V. m
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows% c* e/ s5 E/ Q$ u$ O
gyp ERR! find VS **************************************************************+ ?6 z: L/ a4 P7 L. t0 _! e
gyp ERR! find VS. Z% S8 F* K! l. `1 r
gyp ERR! configure error
+ D9 g" H$ d7 ~- V: ygyp ERR! stack Error: Could not find any Visual Studio installation to use( A5 A v2 [; m3 K3 [: Y+ f& h
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
$ L4 c1 q/ z/ R2 C" B2 i8 `" v$ K2 |dio.js:121:47)
# X$ e; _ [: v9 {# `4 ngyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16! o- B2 u8 `9 g* I! G1 ?0 K
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:167 B, p1 N$ F$ w- G9 w
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
& H2 l+ W J( e2 O6 igyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16/ b, V4 C& L0 d+ n1 j
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)3 S5 x$ S3 F7 \% g/ R& |
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
6 V0 g- L- b& C$ x& C# ogyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
7 u6 O* P1 e# ngyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
2 _! @! E) d0 g' hgyp ERR! System Windows_NT 10.0.15063
; P( @& r% ~8 j' y: p
$ ?& T# M% `; @( F5 V解决办法
t w. T: _. h5 L1、卸载nodejs重新安装一遍
6 w/ d% m; r; R; j+ Y$ ]: k' S. S* Y" q( [4 @0 c4 X9 U
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
* ^- x4 F" @ g1 g7 W
6 x- k' a9 P9 `! n3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools8 U# B+ t' [& q' J5 S6 Q: E- v
————————————————# b$ x5 Y4 P- V
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
. E! L! c7 n1 A% O4 f+ A" A7 _原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|