3

I am building an Electron app using React.js. I am attempting to use NeDB as the recommended DB for Electron. However, I cannot get the app to connect to the database.

When I move things around to troubleshoot or attempt to use an IPC I often get this error:

TypeError: fs.existsSync is not a function (anonymous function)node_modules/electron/index.js:6

Link to repository: https://github.com/hcuffy/react-grade

How can I get connect to NeDB from my Electron app?


Update

  • I got the DB to be created and connected by placing the DB connection in the main process.
  • Attempting to access the DB from the renderer process generates the error above. Remote is not accessing the db in main.

0 Answers0