|
|
报错信息:
3 F1 w) F3 q! w```bash
$ @& A- x" `; @( ^" k/ }: }gyp ERR! find VS
6 G1 I8 D* M0 K2 @* ^! F/ N- hgyp ERR! find VS msvs_version not set from command line or npm config
6 j4 |* C' x3 c9 N$ Ggyp ERR! find VS running in VS Command Prompt, installation path is:
0 u6 g0 T) {. q4 C+ z7 }gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
& j6 k" f- B2 O: _% s4 b1 dgyp ERR! find VS - will only use this version
2 u# w, i ?0 E: \ sgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
( h5 c d- _7 r; W* A# I rgyp ERR! find VS looking for Visual Studio 20152 ^! O; P O) ^1 [
gyp ERR! find VS - not found) U. h- ]+ K) `4 |5 x
gyp ERR! find VS looking for Visual Studio 2013& \+ D2 Y0 K' U0 P
gyp ERR! find VS - not found
) G* V! N, {) B5 C: Kgyp ERR! find VS
+ `; ]; L( p! C* c' Z, \" sgyp ERR! find VS **************************************************************
4 P. l0 `; b" c: O" K- `2 H& X6 ygyp ERR! find VS You need to install the latest version of Visual Studio3 a/ N$ z1 j' x" @% v+ K3 z! V& d
gyp ERR! find VS including the "Desktop development with C++" workload.
/ |2 e4 Z: l- w0 ^9 p/ T& xgyp ERR! find VS For more information consult the documentation at:6 \+ O9 j1 W2 g) C& P
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
5 ?! k: a; w _6 Tgyp ERR! find VS **************************************************************( I' a) \/ O$ i! Y
gyp ERR! find VS' q, x6 A5 r M: ?! n
gyp ERR! configure error
5 Z8 K: {) b. Q- qgyp ERR! stack Error: Could not find any Visual Studio installation to use
$ K | v) g$ S& c( b/ V& ygyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu3 ]9 C! K8 V2 ^5 L3 U6 B
dio.js:121:47)$ \! E% ^3 ?% C j
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
; ^( T' Q( T& R3 z/ Zgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
# o$ J$ X1 Y9 \* U- ^. kgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
& h( M6 _7 y8 W* f( G& { a; ?gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16+ ?$ k9 H1 y E/ M- G
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
& h/ K3 ?$ _' U8 i8 {, Vgyp ERR! stack at ChildProcess.emit (events.js:315:20)
# e# `/ d. `6 [6 J& ? ^gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
$ `3 D9 S3 Z' A% n& p% Zgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
1 f: q8 T$ q( m3 Ngyp ERR! System Windows_NT 10.0.15063 2 ]4 k( P' w, L. I& G
, N( V# t9 M0 b- E" Y
解决办法! R6 v4 L: i; I
1、卸载nodejs重新安装一遍( ^# J* C I0 }8 F% n+ w3 P
: w5 P/ i# H k7 z" c( d2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
7 {9 K0 f+ P& S5 d
1 t1 y! ]# S. j3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
, e; E! h* @3 U8 a7 l7 J————————————————- E$ I; Y9 b7 s7 b `4 J n8 w* X
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。" q$ `$ `9 i* t2 l, w7 Z
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|