nedbhq / nedb-core

The JavaScript Database, for Node.js, nw.js, electron and the browser
MIT License
79 stars 9 forks source link

Error: `.storage` not found #5

Open undavide opened 5 years ago

undavide commented 5 years ago

Hi, in a vue/vuex project, the build fails:

 ERROR  Failed to compile with 1 errors
This relative module was not found:
* ./storage in ./node_modules/nedb-core/lib/persistence.js

My code is as simple as:

var Datastore = require('nedb-core')

Any suggestion? Thank you

leonheess commented 5 years ago

I have a similar problem:

persistence.js:30 Uncaught Error: Cannot find module './storage'
    at webpackMissingModule (persistence.js:30)
    at new Persistence (persistence.js:30)
    at new Datastore (datastore.js:55)
    at Module../src/index.js (index.js:21)
    at __webpack_require__ (bootstrap:785)
    at fn (bootstrap:150)
    at Object.0 (Utils.js:256)
    at __webpack_require__ (bootstrap:785)
    at checkDeferredModules (bootstrap:45)
    at Array.webpackJsonpCallback [as push] (bootstrap:32)
    at main.chunk.js:1
webpackMissingModule @ persistence.js:30
Persistence @ persistence.js:30
Datastore @ datastore.js:55
./src/index.js @ index.js:21
__webpack_require__ @ bootstrap:785
fn @ bootstrap:150
0 @ Utils.js:256
__webpack_require__ @ bootstrap:785
checkDeferredModules @ bootstrap:45
webpackJsonpCallback @ bootstrap:32
(anonymous) @ main.chunk.js:1
index.js:1437 

./node_modules/nedb-core/lib/persistence.js
Module not found: Can't resolve './storage' in 'C:\Daten\Projects\theme-manager\node_modules\nedb-core\lib'
jeremy21212121 commented 4 years ago

This is old, but shows up in searches so I thought I would post this for anyone else that stumbles across this repo.

You probably want to use the repo that this was forked from: https://github.com/louischatriot/nedb. Depending on your needs, you might want to pick a different project altogether.

See this discussion for more info: https://github.com/louischatriot/nedb/issues/492#issuecomment-521083426