electron-forge安装中遇到的问题

现象

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

deprecate [email protected] › graceful-fs@~3.0.5 please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
deprecate [email protected][email protected][email protected][email protected] Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
deprecate [email protected][email protected] › 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! [email protected] start: `electron-forge start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

你可能感兴趣的:(前端,electron)