node.js - 使用nedb时重命名错误
问题描述
使用nedb时,我收到重命名错误为
/home/rajiv/Coding/vote-for-change/node_modules/nedb/lib/datastore.js:77
if (err) { throw err; }
^
Error: ENOENT: no such file or directory, rename '/home/rajiv/Coding/vote-for-change/logs/votersLog~' -> '/home/rajiv/Coding/vote-for-change/logs/votersLog'
我连接到数据库为:
var db = new Datastore({
filename: '/home/rajiv/Coding/vote-for-change/logs/votersLog',
autoload: true
});
为什么我会收到重命名错误?
解决方案
You are probably creating multiple instances of the datastore with the same filename.
Credit to this issue: https://github.com/louischatriot/nedb/issues/136
推荐阅读
- python - 如何获取数据框中的前一行值?
- flutter - Flutter:未来不等待
- javascript - 在 CI 环境中使用 Playwright 登录 Google
- mongodb - 使用 mongodb+srv 配置 Mongo
- android - 如何在没有完成活动的情况下设置活动结果?
- sql - 如何在sql server中将数据更新为json数组并选择数据作为json数组
- python - 在 pytorch 中定义一个连接不完整的网络,比如卷积
- android - 将 viewpager2 与 TabLayoutMediator 一起使用时调用下一个片段的生命周期方法
- embedded - 应用于嵌入式设备时的 NTP 服务器语法
- vb.net - VB.NET LINQ 中的左连接