|
|
报错信息:
! W) Z+ y) u5 w```bash
9 j1 j* K9 }/ `. H: R% M% qgyp ERR! find VS
- v/ T" ^$ y" G' Z% [$ Z4 Hgyp ERR! find VS msvs_version not set from command line or npm config
7 C* X+ Y( \- j5 ]. lgyp ERR! find VS running in VS Command Prompt, installation path is:' k0 a1 W7 r) o! `
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017", Z# t( S1 q" c' S+ ]7 s5 l
gyp ERR! find VS - will only use this version0 z P" p {% u- |% C+ h
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
\8 N" K4 t: z. v5 R9 Sgyp ERR! find VS looking for Visual Studio 2015& n6 U3 _& d ]5 Z6 L. f
gyp ERR! find VS - not found0 x8 W3 j" ]1 V! q# n& |; s
gyp ERR! find VS looking for Visual Studio 2013
, \" z0 y4 e0 W7 i0 ngyp ERR! find VS - not found
$ U7 O* p9 E4 Z' P5 b% \ J" G ugyp ERR! find VS
4 N) b4 S" ]+ \% ~) p; |* I7 Y5 n5 Pgyp ERR! find VS **************************************************************
; [) u- ~: \4 i$ j( x5 ~) e; T+ Igyp ERR! find VS You need to install the latest version of Visual Studio
+ {$ R, P8 _1 Y, ]gyp ERR! find VS including the "Desktop development with C++" workload.
6 P1 t6 @2 ?4 o5 kgyp ERR! find VS For more information consult the documentation at:
% u) k2 I% y5 |) R* N/ F3 Ggyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows+ I6 V* v0 }) A8 r' U; A
gyp ERR! find VS **************************************************************
6 x1 ?& F* _( ~gyp ERR! find VS
* X; u1 Z2 U* I. \" s8 {gyp ERR! configure error
! [* i y t8 {) k9 B0 xgyp ERR! stack Error: Could not find any Visual Studio installation to use
' z( k1 N% E, w5 H3 t) p% e& Wgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu+ m1 i, ?( T( i" R \& h8 e) S- z
dio.js:121:47)( w+ L E5 o7 L5 z5 ~& R
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16# q1 ]0 j9 w5 L
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
6 v/ a+ B n4 f& M) \/ N5 Wgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
) l& B+ P0 k' ^4 E' H+ zgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:164 u( ~! ?0 o3 G6 }+ x5 [3 }" ?
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
* a% i% E* \- fgyp ERR! stack at ChildProcess.emit (events.js:315:20)
, L0 o! f8 V6 c) }, W! E6 `gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)- |; z; ?, c A9 _5 P( ?2 g* I& s
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
: t0 [( v# B+ ?# jgyp ERR! System Windows_NT 10.0.15063
`; b& p' \3 Z; o
4 S; @4 F9 p+ J) v0 G2 a$ c解决办法% g! u/ p* M# o
1、卸载nodejs重新安装一遍
, B9 s2 u( k9 b0 D
* i% Q' ?& C$ ]& r" F( `" {2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
( N3 o3 V! s- {* ^' c& P* c9 b, Y, f% u
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
5 I; V& E$ _! P8 _6 T( u6 A8 h————————————————# ] F1 @ p; X( P+ M
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。+ B" [9 X& t5 ~ }, P
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|