atlassian / nucleus

A configurable and versatile update server for all your Electron apps
Other
398 stars 93 forks source link

Running `yarn dev` throws `nucleus Failed to connect to DB` error #132

Open captain-woof opened 3 years ago

captain-woof commented 3 years ago

After following the steps to build, running yarn dev throws nucleus Failed to connect to DB error. Below is the output.

root# yarn dev
yarn run v1.22.10
$ concurrently --raw "npm run start:fe" "npm run start:server:dev" "npm run start:static"

> nucleus-server@1.1.3 start:static
> make-dir .files && serve .files --port 9999 --silent

> nucleus-server@1.1.3 start:server:dev
> nodemon --watch src --exec "npm run build:server && cross-env DEBUG=nucleus* npm run start:server:prod" -e ts

> nucleus-server@1.1.3 start:fe
> webpack-dev-server --progress --profile --colors --quiet --open

[nodemon] 1.12.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /root/Desktop/nucleus-server/src/**/*
[nodemon] starting `npm run build:server && cross-env DEBUG=nucleus* npm run start:server:prod`

> nucleus-server@1.1.3 build:server
> tsc && rm -rf lib/__spec__ lib/**/__spec__

 10% building modules 2/4 modules 2 active ...ode_modules/webpack/hot/dev-server.js
> nucleus-server@1.1.3 start:server:prod
> node lib/index.js

 10% building modules 2/6 modules 4 active ...sktop/nucleus-server/public/index.tsx  nucleus Setting up server +0ms
  nucleus Connecting to DB +3ms
  nucleus Failed to connect to DB +918ms
  nucleus Error: Please install sqlite3 package manually
  nucleus     at new ConnectionManager (/root/Desktop/nucleus-server/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:31:15)
  nucleus     at new SqliteDialect (/root/Desktop/nucleus-server/node_modules/sequelize/lib/dialects/sqlite/index.js:14:30)
  nucleus     at new Sequelize (/root/Desktop/nucleus-server/node_modules/sequelize/lib/sequelize.js:233:20)
  nucleus     at new Sequelize (/root/Desktop/nucleus-server/node_modules/sequelize-typescript/lib/models/v4/Sequelize.js:24:13)
  nucleus     at Object.<anonymous> (/root/Desktop/nucleus-server/lib/db/sequelize/models/index.js:286:27)
  nucleus     at Generator.next (<anonymous>)
  nucleus     at /root/Desktop/nucleus-server/lib/db/sequelize/models/index.js:13:71
  nucleus     at new Promise (<anonymous>)
  nucleus     at __awaiter (/root/Desktop/nucleus-server/lib/db/sequelize/models/index.js:9:12)
  nucleus     at Object.default_1 [as default] (/root/Desktop/nucleus-server/lib/db/sequelize/models/index.js:285:12)
  nucleus     at SequelizeDriver.<anonymous> (/root/Desktop/nucleus-server/lib/db/sequelize/SequelizeDriver.js:36:53)
  nucleus     at Generator.next (<anonymous>)
  nucleus     at /root/Desktop/nucleus-server/lib/db/sequelize/SequelizeDriver.js:7:71
  nucleus     at new Promise (<anonymous>)
  nucleus     at __awaiter (/root/Desktop/nucleus-server/lib/db/sequelize/SequelizeDriver.js:3:12)
  nucleus     at SequelizeDriver.ensureConnected (/root/Desktop/nucleus-server/lib/db/sequelize/SequelizeDriver.js:33:16)
  nucleus     at Object.<anonymous> (/root/Desktop/nucleus-server/lib/index.js:131:32)
  nucleus     at Generator.next (<anonymous>)
  nucleus     at /root/Desktop/nucleus-server/lib/index.js:8:71
  nucleus     at new Promise (<anonymous>)
  nucleus     at __awaiter (/root/Desktop/nucleus-server/lib/index.js:4:12)
  nucleus     at /root/Desktop/nucleus-server/lib/index.js:128:8 +0ms
[nodemon] clean exit - waiting for changes before restart
 10% building modules 5/10 modules 5 active .../webpack-dev-server/client/overlay.js
[at-loader] Using typescript@3.1.6 from typescript and "tsconfig.json" from /root/Desktop/nucleus-server/tsconfig.public.json.

39579ms building modules                                                                
29ms sealing
0ms optimizing 
0ms basic module optimization 
10ms module optimization
0ms advanced module optimization 
0ms basic chunk optimization 
1ms chunk optimization 
0ms advanced chunk optimization 
0ms module and chunk tree optimization 
16ms module reviving
0ms module order optimization 
4ms module id optimization 
1ms chunk reviving 
1ms chunk order optimization 
2ms chunk id optimization 
38ms hashing
1ms module assets processing 
2309ms chunk assets processing
2ms additional chunk assets processing 
0ms additional asset processing 
0ms chunk asset optimization 
81ms asset optimization
^C

Please advise.

captain-woof commented 3 years ago

I found the fix. I just installed the sqlite3 package. It wasn't installed for some reason.

npm install --save-dev --save-prod sqlite3