|
|
报错信息:. E- E# p1 Q* {5 f" @. H
```bash
0 S6 m+ ]1 d; m: `gyp ERR! find VS; S' \( w+ p" g0 B
gyp ERR! find VS msvs_version not set from command line or npm config$ r; Z8 X3 ]& ?! K+ J/ B
gyp ERR! find VS running in VS Command Prompt, installation path is:
1 a7 S" i' p% ~gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
& I1 \/ E2 Z8 T0 ogyp ERR! find VS - will only use this version
5 I' ~- k% y8 n# _' g6 |gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
# K; b' L$ \/ x7 tgyp ERR! find VS looking for Visual Studio 2015
, O B% S g( I9 v! H# @gyp ERR! find VS - not found* L9 K$ R4 `6 E$ j& X2 [
gyp ERR! find VS looking for Visual Studio 2013
( T) D+ J6 O! a$ mgyp ERR! find VS - not found$ u- D: Q5 l0 p6 v5 n3 k+ d7 V
gyp ERR! find VS- N& R9 w+ Z# V+ y" o" u
gyp ERR! find VS **************************************************************
! b {* p b. B/ J7 \gyp ERR! find VS You need to install the latest version of Visual Studio) J; G( ` k5 J1 y
gyp ERR! find VS including the "Desktop development with C++" workload.
5 }* U* i; I7 Ggyp ERR! find VS For more information consult the documentation at:' y ~" N) R2 b
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows# L: o2 W" [; J/ w
gyp ERR! find VS **************************************************************' F3 V2 \" ^! t, a. F) O# E4 E. e
gyp ERR! find VS L0 o8 t& c- D) u) ^3 l
gyp ERR! configure error
; o! q3 R3 r: g+ }- \4 H/ Ogyp ERR! stack Error: Could not find any Visual Studio installation to use' n4 e3 r7 V. h. I4 |) n
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu: @% U7 n: G7 E6 I6 p* X4 \
dio.js:121:47)4 l1 Z, j. h5 ~0 s- h
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
' H, ]1 p c* u3 M& ?gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16, U3 A# y$ c$ s+ H
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7! T9 [$ W' q9 D, _& a2 K! w
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16/ M# j- S& p+ J& o# v) M! Q
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)3 o* }" Q) W& P9 O1 j4 C0 ]9 I9 c
gyp ERR! stack at ChildProcess.emit (events.js:315:20)9 C2 T% U, x; H2 ]- D& a6 \
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)" ~ {, M8 B4 c. ?9 a/ O$ L
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
2 Y) v' o# S J7 W6 W/ a8 Q$ T6 jgyp ERR! System Windows_NT 10.0.15063 # t, |: M8 Q ^. x( |! m
5 }- k3 u3 a' N' j* E, A解决办法0 q5 u& F$ z2 D" V7 c* _ A
1、卸载nodejs重新安装一遍" X. c8 ] Z1 b
* ?. z4 D8 x7 b4 i8 L- y3 S- {
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org& L! l ]8 Q- k8 I: ~( A
7 x# k* o; D8 g" l3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
z, h- A3 P5 D; e" N( C8 l! X6 v————————————————1 e' a7 E0 i4 R+ N2 b
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。4 |( U B0 e2 [- w" d
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|