|
|
报错信息:
" E( x9 {, y3 K) P: Z& P```bash
, X% P: f d1 R6 c+ P+ u' L! f' Tgyp ERR! find VS
$ j) [) q7 @; l; Q6 Ngyp ERR! find VS msvs_version not set from command line or npm config
- C1 Y5 T0 \7 s- F1 \% j9 [gyp ERR! find VS running in VS Command Prompt, installation path is:
5 c) {7 Y: w( y( @3 }gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"' S; C, W6 z: N! V1 B2 C$ r
gyp ERR! find VS - will only use this version) U- c: ?; q9 h$ S9 q
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer( X _/ w0 d& ?2 U
gyp ERR! find VS looking for Visual Studio 2015 i, e/ A9 r3 U9 ^5 j
gyp ERR! find VS - not found
7 S& Z! h. K9 ugyp ERR! find VS looking for Visual Studio 20139 [* ~; L/ C9 U
gyp ERR! find VS - not found4 T& M5 p' ?7 p& e/ P( P5 i, j7 D
gyp ERR! find VS
+ \ i: Q6 Y+ f3 b" u6 l2 Pgyp ERR! find VS **************************************************************# b( W2 F ?+ }2 X* F
gyp ERR! find VS You need to install the latest version of Visual Studio
( o, c. q3 q0 egyp ERR! find VS including the "Desktop development with C++" workload.3 L* @* y5 z* Z5 Y% W' U9 ^- `
gyp ERR! find VS For more information consult the documentation at:) R; Q# K' C+ L, u# c: f8 |
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows7 K g) C$ Z5 p0 A7 v1 q6 e
gyp ERR! find VS **************************************************************7 ]5 `: S P/ `" r/ ~
gyp ERR! find VS: q8 E9 v7 [; I- @+ J( }* p) A; e
gyp ERR! configure error) W6 X& y. y4 t9 ~) j; h" B+ X
gyp ERR! stack Error: Could not find any Visual Studio installation to use
6 ?7 b" J8 `: Ngyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu/ K: ~- z! j4 j: v! R
dio.js:121:47)
3 K q8 \, F3 r/ hgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16 d4 R* e1 }+ k
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:165 z7 E* G" T0 V/ F. F. }$ U
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:79 C) e! j9 u7 @9 N
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
. s7 I1 ~) c9 M& s4 mgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)- E" _: R1 J {( K
gyp ERR! stack at ChildProcess.emit (events.js:315:20)0 @( j) J6 G4 |8 U
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
' I, w1 C' A( x$ Q4 cgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
q3 I! e& a; W; V* [* E1 l# Fgyp ERR! System Windows_NT 10.0.15063 ! g: T" z6 b" Z% J5 n
( E6 U/ c# f. Q6 |; e解决办法 l' {1 X4 A$ K$ K; K
1、卸载nodejs重新安装一遍; l# ~7 Z% G5 E% c& g! n5 A) P/ I
3 u5 G" z% J ^2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
+ T$ H7 e1 r6 k& P7 W9 a+ g) J3 h" ]3 t+ _7 D) s
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools0 @; U0 s& ] E' _8 \. x
————————————————" \* f9 G+ l+ S. U$ T. B+ Y) t
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
3 j3 a4 \' O$ \8 r- {' U5 |原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|