当前位置: 首页 > 工具软件 > The-Forge > 使用案例 >

electron-forge安装中遇到的问题

潘星阑
2023-12-01

现象

安装electron-forge和electron-forge init 项目均中出现

deprecate s3@4.4.0 › graceful-fs@~3.0.5 please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
deprecate zip-folder@1.0.0 › archiver@0.11.0 › glob@3.2.11 › minimatch@0.3 Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
deprecate electron-windows-store@0.12.0 › flatten-packages@0.1.4 › wrench@~1.5.4 wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.

electron-forge start或cnpm start报错

Electron forge was terminated:
You must depend on "electron-prebuilt-compile" in your devDependencies
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron01@1.0.0 start: `electron-forge start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron01@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging 			output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\gu\AppData\Roaming\npm-cache\_logs\2019-03-19T03_20_52_321Z-debug.log

原因

npm依赖版本冲突版本

解决

使用npx重新创建项目
npx @electron-forge/cli init my-new-app

 类似资料: