nedb
nedb copied to clipboard
Cannot find module 'binary-search-tree' when packaged with Electron app
- NeDB all installed as documented.
^1.8.0 - Everything works ok when developing app launched with
electron . - After installing both Linux and macOS packaged apps on test machines, both immediately throw an error:
Uncaught Error: Cannot find module 'binary-search-tree'
at Module._resolveFilename (internal/modules/cjs/loader.js:602)
at Function.Module._resolveFilename (/Users/kosso/_SERVER…-search-paths.js:35)
at Function.Module._load (internal/modules/cjs/loader.js:528)
at Module.require (internal/modules/cjs/loader.js:658)
at require (internal/modules/cjs/helpers.js:20)
at Object.<anonymous> (/Users/kosso/_SERVER…db/lib/indexes.js:1)
at Object.<anonymous> (/Users/kosso/_SERVER…/lib/indexes.js:296)
at Module._compile (internal/modules/cjs/loader.js:711)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:722)
at Module.load (internal/modules/cjs/loader.js:620)
I've tried manually installing the dependencies listed in package.json too. Same error.
Any ideas?
Is this even still supported?
It sounds more likely to be an issue with the Electron packager that you are using than with NeDB itself since it works in the local development mode. 🤷♂️