trying to run
heroku run knex migrate:latest
on heroku to set up the db, using node and pg and I get the following error
Error: ENOENT: no such file or directory, scandir '/app/migrations'
knexfile.js
module.exports = {
development: {
client: 'sqlite3',
connection: {
filename: './db/dnd.sqlite3'
},
useNullAsDefault: true,
migrations: {
directory: './db/migrations'
},
seeds: {
directory: './db/seeds'
}
},
production: {
client: 'pg',
connection: {
database: 'my_db',
user: process.env.USER,
password: process.env.PASSWORD,
DATABASE_URL: process.env.DATABASE_URL,
}
}
};
and heres a copy of my package.json file
{
"name": "backend",
"version": "1.0.0",
"description": "backend",
"main": "index.js",
"scripts": {
"test": "(knex migrate:rollback && knex migrate:latest && knex seed:run) && NODE_ENV=test jest --verbose --watch",
"start": "nodemon server.js",
"re": "knex migrate:rollback && knex migrate:latest && knex seed:run"
},
"keywords": [],
"author": "my-name",
"license": "MIT",
"dependencies": {
"bcryptjs": "^2.4.3",
"cors": "^2.8.4",
"express": "^4.16.3",
"helmet": "^3.14.0",
"jsonwebtoken": "^8.3.0",
"knex": "^0.15.2",
"morgan": "^1.9.1",
"pg": "^7.8.0",
"renderer": "^0.1.5",
"sqlite3": "^4.0.3"
},
"devDependencies": {
"coveralls": "^3.0.2",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0",
"jest": "^23.6.0",
"mocha": "^5.2.0",
"nodemon": "^1.18.5",
"supertest": "^3.3.0"
},
"jest": {
"testEnvironment": "node",
"testPathIgnorePatterns": [
"/node_modules/",
"<rootDir>/notes/src/__tests__/"
]
}
}
anyone come across this error before working pg and node and trying to deploy to heroku? I have tried a number of things, but seem to be hitting a bit of a wall at the moment. Not sure what to do.