question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe the bug nedb file no visible,but data can be read,Can you give me an answer? Thx

# data.js

import Datastore from 'nedb'
import path from 'path'
import {remote} from 'electron'


const a = path.join(remote.app.getPath('userData'),'/data.db')

console.log(a)
const db = new Datastore({
    autoload:true,
    filename:a
})
# main.js
import './data.js'
...

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nklaymancommented, Jun 12, 2019

This is the same issue as https://github.com/louischatriot/nedb/issues/531. Mark nedb as an external to use the database file instead of IndexedDB:

// vue.config.js
module.exports = {
  pluginOptions: {
    electronBuilder: {
      externals: ['nedb']
    }
  }
}
0reactions
Hariprabu94commented, Sep 13, 2020

This is the same issue as louischatriot/nedb#531. Mark nedb as an external to use the database file instead of IndexedDB:

// vue.config.js
module.exports = {
  pluginOptions: {
    electronBuilder: {
      externals: ['nedb']
    }
  }
}

i added this to my vue.config.js file. even nedb saving data to indexed db only. What i should do to keep external file. my vue cli version is 4.4.6

Read more comments on GitHub >

github_iconTop Results From Across the Web

NeDB not loading or storing to file - Stack Overflow
My code only works in-memory, persistence to file keeps failing without any error messages. The error callbacks for the loaddatabase and insert events...
Read more >
NeDB: Embedded Persistent Database Written in JavaScript
Embedded persistent or in memory database for Node.js, nw.js, Electron and browsers, 100% JavaScript, no binary dependency. API is a subset of MongoDB's...
Read more >
Express session middleware
Create a session middleware with the given options . Note Session data is not saved in the cookie itself, just the session ID....
Read more >
Building an API with Node and Express | Daniel Shiffman
Classification API – An API that can be trained to classify text into any ... One option is to use a database (like...
Read more >
Star Wars The Black Series NED-B Deluxe 6-Inch Action Figure
Perfect items, best packaging, no extra charge! ... is plastic free packaging. beware if you are looking to display in box. figure is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found