Codestrips project - error when try to run node sqlite (step 9)


I arrived to step 8 successfully (Codestrips project), but then in 9, when I try to run ‘node sqlite’ I get the error message:
“throw er; // Unhandled ‘error’ event

Error: SQLITE_CANOPEN: unable to open database file”.

Can anybody help me?

// code at app.js
const express = require(‘express’);
const app = express();
const bodyParser = require(‘body-parser’);
const morgan = require(‘morgan’);

const PORT = process.env.PORT || 4001;


app.listen(PORT, () => {
console.log(Server is listening on port: ${PORT})

module.exports = app;

// and code at sql.js
const db = new sqlite3.Database(’/db.sqlite’);

db.serialize(() => { TABLE IF EXISTS Strip); TABLE IF NOT EXISTS Strip( id INTEGER PRIMARY KEY, head TEXT NOT NULL, body TEXT NOT NULL, background TEXT NOT NULL, bubble_type TEXT NOT NULL, bubble_text TEXT NOT NULL DEFAULT "", caption TEXT NOT NULL DEFAULT "" ))

Thanks in advance, Fernando

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.