Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

NeDB error with Rollup & Electron #486

Open
nnooney opened this issue Dec 31, 2016 · 0 comments
Open

NeDB error with Rollup & Electron #486

nnooney opened this issue Dec 31, 2016 · 0 comments

Comments

@nnooney
Copy link

nnooney commented Dec 31, 2016

I'm building an app with NeDB and Electron and using Rollup to bundle the JS modules I include. When I compile the JS and start the application with Electron, I get the following error:

TypeError: Cannot read property 'prototype' of undefined

Here is a gist that can reproduce this issue:
https://gist.github.com/nnooney/816ad3f483aa7b85e7dcd64896de0cac

Investigating the stack leads back to an issue with line 81 in lib/datastore.js. What I think is happening is that Rollup cannot resolve a require statement that handles object notation. To fix this, I've moved the require statement to the top of the file. The fix can be seen in the following pull request:

JamesMGreene added a commit to JamesMGreene/nestdb that referenced this issue Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant