nedb icon indicating copy to clipboard operation
nedb copied to clipboard

Cannot find module 'binary-search-tree' when packaged with Electron app

Open kosso opened this issue 6 years ago • 1 comments

  • 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?

kosso avatar Feb 22 '19 15:02 kosso

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. 🤷‍♂️

JamesMGreene avatar Mar 10 '19 21:03 JamesMGreene