Node.js 错误:打开(";config../database.js";):没有这样的文件或目录错误:无法索引文件';config../database.js';|Nodejs
我创建了一个包含数据库文件的文件夹配置。但在通过git检查状态时,它显示我有一个未跟踪的文件:Node.js 错误:打开(";config../database.js";):没有这样的文件或目录错误:无法索引文件';config../database.js';|Nodejs,node.js,database,git,Node.js,Database,Git,我创建了一个包含数据库文件的文件夹配置。但在通过git检查状态时,它显示我有一个未跟踪的文件:config../,就路径而言,这有点奇怪 它显示: The file will have its original line endings in your working directory error: open("config../database.js"): No such file or directory error: unable to index file 'con
config../
,就路径而言,这有点奇怪
它显示:
The file will have its original line endings in your working directory
error: open("config../database.js"): No such file or directory
error: unable to index file 'config../database.js'
但是我没有提到的地址,config../database.js
我的数据库文件如下:
config / database.db
models
routes
public
...
So on
这是database.js:
const Sequelize = require('sequelize');
const path = require('path');
module.exports = new Sequelize('pages','','', {
//host: 'localhost',
dialect: 'sqlite',
operatorsAliases: false,
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
},
storage :path.join(__dirname,'..','pages.db') // neither any combinations of
// '/' working here
});