Boa noite a todos(as) Baixei o arquivo database.js e coloquei na pasta config como dito, alem disso baixei a pasta do projeto disponibilizada no inicio da aula. quando executo o npm start aparece o seguinte erro:
[nodemon] 1.18.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
internal/modules/cjs/loader.js:968
throw err;
^
Error: Cannot find module 'sqlite3'
Require stack:
- D:\node\src\config\database.js
- D:\node\src\app\rotas\rotas.js
- D:\node\src\config\custom-express.js
- D:\node\server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (D:\node\src\config\database.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'D:\\node\\src\\config\\database.js',
'D:\\node\\src\\app\\rotas\\rotas.js',
'D:\\node\\src\\config\\custom-express.js',
'D:\\node\\server.js'
]
}
[nodemon] app crashed - waiting for file changes before starting...
`
Não faço ideia de como arrumar e não vi ninguem tendo esse problema. segue o package.json:
{
"name": "casadocodigo",
"version": "1.0.0",
"description": "Livraria Casa do Codigo",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon server.js"
},
"author": "Gabriel Leite",
"license": "ISC",
"dependencies": {
"event-stream": "^4.0.1",
"express": "4.16.3",
"marko": "4.13.4-1"
},
"devDependencies": {
"nodemon": "1.18.4"
}
}