In Electron process.stderr is not defined

北慕城南 提交于 2019-12-23 12:21:00

问题


I'm trying to use sqlite3 nodejs add-on in my Electron app. I encountered an error while just loading the sqlite3 module. Looking at the stack trace of the crash I see that sqlite3 has several dependencies and one of them being a logging library (npmlog). This library tries to initialize some logging objects from process.stderr. It crashes because process.stderr is undefined.

When I check the value of process.stderr from DevConsole, I see that it's indeed undefined.

Looking at the Electron documentation of process module, I see that it's supposed to be an extended version of nodejs's process module. Since nodejs has process.stderr defined, I'm not sure why it's not defined in Electron.

Any ideas?

来源:https://stackoverflow.com/questions/38997260/in-electron-process-stderr-is-not-defined

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!