|
|
报错信息:
4 m* u# @$ k" v) |5 }/ k```bash
' Q- J! s8 _0 jgyp ERR! find VS" T& i( }# Z ~" E! B& C9 l
gyp ERR! find VS msvs_version not set from command line or npm config, O. S& Z# k0 w, A
gyp ERR! find VS running in VS Command Prompt, installation path is:
, H5 _7 v! f2 ^gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017". q3 ~. m' O0 S) r; u$ n
gyp ERR! find VS - will only use this version+ ?8 J/ I1 w* c* Y5 `% W& @1 c
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer1 y" c$ U& E8 f0 X
gyp ERR! find VS looking for Visual Studio 2015
/ t5 z7 G6 _+ s9 Egyp ERR! find VS - not found0 g& v" |" w( h8 A! D" M6 N2 `
gyp ERR! find VS looking for Visual Studio 2013% x4 `/ Y; U2 i# O
gyp ERR! find VS - not found
: @( e# P$ U4 v8 _4 b% `gyp ERR! find VS, ?8 S8 o' v) F$ S d* t( J }
gyp ERR! find VS **************************************************************
, O7 v+ q: c& J. _% q4 T8 L5 Wgyp ERR! find VS You need to install the latest version of Visual Studio- w( [7 \$ k0 M: A
gyp ERR! find VS including the "Desktop development with C++" workload." A$ T) v: q5 ^( u3 Y! {% m0 u5 q$ ~0 z
gyp ERR! find VS For more information consult the documentation at:" |8 e4 T" o6 O, {) X( ~, c
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows5 b' A: e q# j: y
gyp ERR! find VS **************************************************************
+ s' G5 V5 x4 sgyp ERR! find VS
2 e6 K p' Y2 {3 f/ wgyp ERR! configure error
9 t% ~# G8 u- I# `gyp ERR! stack Error: Could not find any Visual Studio installation to use1 h2 x. C: E& ?& R# T/ T$ }7 X& p
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu$ |: E% b5 F" {( W l
dio.js:121:47)/ _ L/ U l' h+ ^2 o
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16" h/ l( ?; D c
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
7 e/ J) P) V2 j2 o+ i# U4 o, O ^gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
4 o+ x8 ]' o. y5 ^7 I1 r+ ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16# c. E3 B: Z; |0 u; J9 T; L% W
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5); I! n5 I9 p2 h' _- }" _8 T6 ]: p
gyp ERR! stack at ChildProcess.emit (events.js:315:20)# e E# p) }6 A5 d+ [3 D
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)( W- m I. y( k7 V: P
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)( C, q r5 B& D' O' {3 m
gyp ERR! System Windows_NT 10.0.15063
3 I+ B% Z# @5 z. L
+ S* O0 }& X4 j& q6 E% _解决办法0 C7 b* p+ b2 p- F) [
1、卸载nodejs重新安装一遍, |) ?- M( m! |, q0 L8 J% C# v
& {9 T+ n- n( G
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org# G) Z2 F; l; D$ k- p
$ E# G3 w3 F, Q b. U. d3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
1 b# g8 m5 V+ h/ \4 S: K5 F————————————————3 l2 m% J" h1 Z( Y% M3 K- U
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。, }" Y' K/ o6 B) [: @3 k" e0 A
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|