Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro ao final da aula: Cannot find module 'sqlite3'.

C:\Users\DGC\Desktop\cursos_alura\NodeJs>npm start

> nodejs@1.0.0 start C:\Users\DGC\Desktop\cursos_alura\NodeJs
> nodemon server.js --ignore *.marko.js

[nodemon] 1.18.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
internal/modules/cjs/loader.js:1032
  throw err;
  ^

Error: Cannot find module 'sqlite3'
Require stack:
- C:\Users\DGC\Desktop\cursos_alura\NodeJs\src\config\database.js
- C:\Users\DGC\Desktop\cursos_alura\NodeJs\src\app\rotas\rotas.js
- C:\Users\DGC\Desktop\cursos_alura\NodeJs\src\config\custom-express.js
- C:\Users\DGC\Desktop\cursos_alura\NodeJs\server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
    at Function.Module._load (internal/modules/cjs/loader.js:898:27)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (C:\Users\DGC\Desktop\cursos_alura\NodeJs\src\config\database.js:1:17)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\DGC\\Desktop\\cursos_alura\\NodeJs\\src\\config\\database.js',
    'C:\\Users\\DGC\\Desktop\\cursos_alura\\NodeJs\\src\\app\\rotas\\rotas.js',
    'C:\\Users\\DGC\\Desktop\\cursos_alura\\NodeJs\\src\\config\\custom-express.js',
    'C:\\Users\\DGC\\Desktop\\cursos_alura\\NodeJs\\server.js'
  ]
}
[nodemon] app crashed - waiting for file changes before starting...
1 resposta
solução!

tenta dar na raiz do projeto npm install sqlite3