Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

关于Electron升级到4.0+的问题 #1

Open
JackChius opened this issue Jun 15, 2019 · 2 comments
Open

关于Electron升级到4.0+的问题 #1

JackChius opened this issue Jun 15, 2019 · 2 comments

Comments

@JackChius
Copy link

JackChius commented Jun 15, 2019

electron 升级到相对新的4.0.3后,无法启动项目

开始遇到 app.makeSingleInstance(cb)' is deprecated ,not a function的报错,
查询是方法经过变动,替换为app.requestSingleInstanceLock()后通过,

然后依据提示将component-class/index.js下的
var index = require('indexof');换为
var index = require('component-indexof');

此时CLI显示 webpack: Compiled successfully.,但仍然没有程序窗口弹出

大佬可以帮忙看看吗

@JackChius
Copy link
Author

JackChius commented Jun 15, 2019

  • 补充

compile之前行输出的报错,会不会跟这里的类型error有关系?

(node:18512) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:129:9)
at Object.writeFile (fs.js:1137:14)
at D:\mydev\electron-react\main_process\utils\deviceid.js:91:16
at process._tickCallback (internal/process/next_tick.js:68:7)

(node:18512) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:18512) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@ydcool
Copy link

ydcool commented Aug 8, 2019

2.0.0 这个版本确实太旧了,在最新的 win10 1903 上有很多问题,希望能升级一下版本

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants