为什么当我尝试从 npm 安装 ElectronJS 时我的终端卡住了

问题描述 投票:0回答:1

所以我是一名 javascript 开发人员。我基本上使用 javascript 使用 fontend 库(如 React 和后端框架 linkeexpress)构建 Web 应用程序。但我想尝试新事物,例如桌面开发。然后我偶然发现了 Electron.js。所以我想“为什么不呢?我很了解 javascript。让我们试试吧。”然后我做的第一件事就是尝试按照一个不错的教程安装电子(像普通人一样)。但不知何故我根本无法安装该库。它只是在最后一行停留了几个小时。这是我的终端活动..

PS E:\study\ElectronJS\image_resizer> npm i electron
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
[##################] \ reify:core-js: WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature 

我只是想安装一个js库man..

javascript npm electron npm-install
1个回答
0
投票

要解决弃用警告,您需要更新警告中提到的依赖项。例如:

  1. phin
    更新到受支持的版本。
  2. 更新
    mkdirp
    至版本1.x。
  3. 升级
    core-js
    到最新版本,最好是3.23.3以上。

您可以通过运行以下命令单独更新这些依赖项:

npm install phin@latest
npm install mkdirp@latest
npm install core-js@latest

更新这些依赖项后,您可以尝试再次安装 Electron,希望警告不会再出现。

© www.soinside.com 2019 - 2024. All rights reserved.