error while loading database file
See original GitHub issuei have a database file which i load using your sample code:
var Datastore = require('nedb')
, db = new Datastore({ filename: 'p.nedb' });
db.loadDatabase(function (err) {
// Callback is optional
// Now commands will be executed
console.log("finished", err);
});
then i get this error:
⇒ node nedbtest.js
finished Error: "toString()" failed
at Buffer.toString (buffer.js:528:11)
at tryToString (fs.js:445:15)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436:12)
any ideas? i could send you the file if it helps (it is 35mb zipped, 639mb unzipped, but i previously had the error with smaller files as well). the error is not catchable…
thanks for looking into this
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
"An error occurred while opening the database file. The ...
"An error occurred while opening the database file. The database may be corrupted or you may be out of hard disk space.
Read more >How To Fix The "Error Establishing a Database Connection" in ...
The first thing to do is check to ensure your database login credentials are correct. This is by far the most common reason...
Read more >SQL Syntax Error when Loading Database File (Possible ...
1 Answer 1 · Navigate to your MySQL config file. This SO question is an excellent reference for finding it. · Find the...
Read more >Troubleshooting database import errors
Most SQL files contain a CREATE DATABASE and a USE statement, which are created when you export the contents of an existing database....
Read more >Error while loading database | SAP Community
Error while loading database · 1.Generated the ddl statements in the source system. · 2.dropped the target database · 3.dropped the devices in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This would probably be relieved with PR #463.
@KeitIG I call update at line 60 in this file. I can confirm that the items does update and are registered with the same ID in the database file, with older versions towards the top of the file and the newer copy on the bottom.