|
|
报错信息:
3 }! f: Q0 Y. N$ K```bash
) u/ ^* S, y- ]' I' Q4 V& y# Bgyp ERR! find VS. M( Q7 B1 [( r) g$ |& E
gyp ERR! find VS msvs_version not set from command line or npm config
. \2 ]$ U0 c1 C: t! N% hgyp ERR! find VS running in VS Command Prompt, installation path is:
4 v- }& R b2 Wgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"8 g9 C: X- N4 b4 E8 g
gyp ERR! find VS - will only use this version* _# U: ~1 m; q0 S: Z
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer& D" H+ f1 H2 E' j, v
gyp ERR! find VS looking for Visual Studio 20151 T* C9 d) d4 f3 c+ ]
gyp ERR! find VS - not found( r) e& R2 B3 b ]
gyp ERR! find VS looking for Visual Studio 2013
/ h% A1 a8 w6 |+ R; _" D) F. rgyp ERR! find VS - not found
* m2 f+ O# Q" i) u6 f# L; T& Z% Ugyp ERR! find VS6 A- D _0 C1 g& |1 \; u
gyp ERR! find VS **************************************************************
- S: J4 H i/ D% y+ Pgyp ERR! find VS You need to install the latest version of Visual Studio
2 s7 h# f7 L% Z: wgyp ERR! find VS including the "Desktop development with C++" workload.7 x9 m' L. N: |; u7 f) @; @
gyp ERR! find VS For more information consult the documentation at:8 V" v- M$ t" l0 _: h/ u- i
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
1 D4 u6 H0 N0 N* G+ xgyp ERR! find VS **************************************************************
; q# W9 w" @" D3 C: W6 egyp ERR! find VS
) ^9 O2 Q0 p5 a+ h2 ogyp ERR! configure error* o& f5 b; j" B5 x4 e8 Y) [
gyp ERR! stack Error: Could not find any Visual Studio installation to use
8 f, O* }* V& [' q. E( b5 ~gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
, i, {, o6 L( ?' `; ~, o( z# a" adio.js:121:47)( y3 x8 ^9 g( _# Y9 i- H8 L
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
! j7 H- j# Q* j$ ~0 tgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
7 Y% l h' Y1 l$ d( zgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
8 o) D$ e9 R; ?' }7 l! agyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:164 k0 F1 N: G" W5 j
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)' `8 D+ x3 ]! B2 D! Y6 T
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
& r9 [: R1 D8 F( Q6 R6 `gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)$ [* m, K+ [, z8 t) R: h
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
0 y- t" n# |" i8 U& }$ wgyp ERR! System Windows_NT 10.0.15063 0 m; N5 e+ S; H5 l( F. @$ {& e
; T& A: z; C$ W, H/ H4 O解决办法. @2 ]! T8 m1 t3 `
1、卸载nodejs重新安装一遍
& p9 f4 q7 n# Z; \2 f/ X* L; F4 d; }- l9 Q/ e% i: N9 I+ J6 g( D
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
L# L& m+ ^- D2 {
( v0 B3 i5 w% J; ~) k3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools9 \5 h/ q, N9 X1 ]. s# f% G. D3 z! ~
————————————————0 Y" G4 ~& U) U, c2 v
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。& b5 ]# e v1 i) H* B, D
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|