|
|
报错信息:% d3 E' c, o7 M& e6 N4 R0 d% F2 A
```bash7 `) ]7 Y3 G2 I' t n
gyp ERR! find VS; v% N7 |) q F4 w& ?7 y! n. @
gyp ERR! find VS msvs_version not set from command line or npm config% G# q% r& k5 V7 w
gyp ERR! find VS running in VS Command Prompt, installation path is:/ n* w0 j+ z: [4 ^' X- [) w
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
M; }2 l. @& P" h+ q( [3 Mgyp ERR! find VS - will only use this version7 v0 _! H3 o2 c$ C
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
0 @: f/ |. ^4 q* b. z2 tgyp ERR! find VS looking for Visual Studio 2015
7 t8 q( `5 o, Xgyp ERR! find VS - not found
2 k( E# d+ c7 Y) y2 Jgyp ERR! find VS looking for Visual Studio 20137 }: U+ W$ D. C2 i+ q
gyp ERR! find VS - not found" V9 [( f! x' f' b' U
gyp ERR! find VS
9 u2 d( H0 A" l, H0 d5 b1 I Wgyp ERR! find VS **************************************************************9 ^* \- V% f2 r$ E5 e- }9 P1 s
gyp ERR! find VS You need to install the latest version of Visual Studio! U: y" t- p) N. n: Y
gyp ERR! find VS including the "Desktop development with C++" workload.
1 y- L$ [( a: W3 ?gyp ERR! find VS For more information consult the documentation at:
8 A3 H+ p: m- b) K! ggyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
: u4 a& `* h% Q3 T6 agyp ERR! find VS **************************************************************2 F- o$ |5 A) b. m
gyp ERR! find VS8 w2 d7 D4 |0 u
gyp ERR! configure error' s" T) _- `6 Y+ h4 ~1 H( P
gyp ERR! stack Error: Could not find any Visual Studio installation to use
. c0 V" e% y" x Rgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
7 m4 d# n* ~3 v2 E9 e) W9 _7 c) mdio.js:121:47)" [, _6 ]0 k) \5 i3 q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
% B7 Q( e0 S3 v' I$ `/ Egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
; B) t+ ~- i2 o% lgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
' P8 g# R& s8 L6 L9 c: lgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:163 e1 O3 p+ M5 ]# S: D1 z- R
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
' @+ J- q+ l% ^% a) @2 @$ @1 {* Tgyp ERR! stack at ChildProcess.emit (events.js:315:20)" ` L8 V1 d+ `4 z6 p& B
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
8 [+ D) }/ U# d; ]gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5); s6 I5 e% a& S8 w% `! e+ _
gyp ERR! System Windows_NT 10.0.15063 4 a! m& W% {# }4 x* ~
; A5 `/ z! `; @' X; m: G
解决办法
4 n7 z( x( X0 s1、卸载nodejs重新安装一遍
; P- R5 w! d$ f) Y7 e" @
4 Y1 ]4 P" R% O6 w0 e2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
6 O5 i7 Z5 t0 X1 X( Y) _# c6 b" r z1 K m- I/ h
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools/ E5 e4 V5 R0 K" _! N/ d4 r0 c$ S
————————————————% o, A$ \ b l2 |5 Y; b
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。0 r6 b7 o- H% ^( R
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|