Fallenbagel / jellyseerr

Fork of overseerr for jellyfin support.
https://docs.jellyseerr.dev/
MIT License
3.95k stars 250 forks source link

Yarn Start throw a sqlite3 issue #268

Closed nephaste closed 12 months ago

nephaste commented 1 year ago

Description

Trying to compile in a /opt/JellySeerr Prefix with NodeJS 16.18.1

but on stat it throw an error with sqlite3

/opt/JellySeer/jellyseerr/node_modules/typeorm/driver/sqlite/SqliteDriver.js:130 throw new DriverPackageNotInstalledError_1.DriverPackageNotInstalledError("SQLite", "sqlite3"); ^

DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save

sqlite3 is well installed ...

image

Version

git master

Steps to Reproduce

follwoing step in install tutorial

installed yarn 1.2.19 as well into my prefix

image

Yarn install

image

yarn run build

image image

starting on my dev environment (and on target as wel) jump into this error

image

Screenshots

No response

Logs

dont know how to find it

Platform

desktop

Device

none

Operating System

Linux Ubuntu

Browser

none

Additional Context

No response

Code of Conduct

nephaste commented 1 year ago

already tried to install " npm install sqlite3 --save" but has no impact error remain the same

Fallenbagel commented 1 year ago

Try on nodejs version LTS. Also if you have discord, please join so can give real-time support as we mostly do support on discord

nephaste commented 1 year ago

Hi Thanks... got same problem with Overseerr .. problem is libc on target system is 2.21 and latest bianry prodived by NodeJS are not compatble with this old libc... I will give a try with version 17 (latest working) or build a static version for nodeJS 18

nephaste commented 1 year ago

seems i am unlucky NodeJs17 and NodeJS18 LTS throw the same error

image

nephaste commented 1 year ago

and got an error installing sqlite3 now

image

Fallenbagel commented 1 year ago

and got an error installing sqlite3 now

image

Could you try yarn install sqlite3 --save

nephaste commented 1 year ago

seems command is yarn add sqlite3 --save (also tried without --save) same issue

image

image

Fallenbagel commented 1 year ago

Try adding the it to global w the -g arg

nephaste commented 1 year ago

will try tomorrow... also found this

https://github.com/TryGhost/node-sqlite3/wiki/Binaries

will give a try if -g do not work

nephaste commented 1 year ago

image

but

image

it is getting me mad , it is well present

image

and some check

image

image

Fallenbagel commented 1 year ago

https://stackoverflow.com/questions/40461439/error-installing-sqlite3-in-node-js

^ Try one of these. There seems to be an issue with your node_modules folder. Have you tried deleting and re-running a yarn install?

Also for a hassle-free usage I recommend docker (and in the near future we will hopefully release snaps, just need it snaps to be configured)

nephaste commented 1 year ago

did everything, built several times... also used the nodejs 16.7.1 (used in docker)

there is no way to make it run when built from source... goal is not use docker and bring it as native application on Qnap NAS

i think more and more than issue is related to typeorm and not sqlite3

image

latest push version is 0.3.11 ... but may be i am wrong

nephaste commented 1 year ago

installing typeorm 0.2.5 ..error changed

image

export NODE_ENV=production do not fix

Fallenbagel commented 1 year ago

did everything, built several times... also used the nodejs 16.7.1 (used in docker)

@nephaste Which branch is this. Could you git checkout to the develop branch

But before that remove the node_modules folder. A CLEAN installation might help

Also, which ubuntu os version is this? I have tried on debian, ubuntu (a lot of people in discord use natively built from source in ubuntu, including one of the dev), arch(use for test builds), nixos (running as my production) and alpine (the one used in docker)

EDIT: debian Screenshot_20221213_194626_Termux

nephaste commented 1 year ago

I must run on trusty ubuntu 1404 ... due to libc restriction

i am trying to move on dev branch to see (was on main)

still got this typeorm warning

image

Fallenbagel commented 1 year ago

Those warnings are not significant. You can safely ignore them.

Also I just tested on Ubuntu 22.04.1 LTS image

nephaste commented 1 year ago

still no luck .. typeorm makin mess even on dev branch

image

Fallenbagel commented 1 year ago

still no luck .. typeorm makin mess even on dev branch

image

Would snap builds work for you? We gonna release snap builds soon

nephaste commented 1 year ago

tried ubuntu 2204 same script... seems to work (thats crazy) ... will see if cross toolchain worked exporting on NAS target

image

nephaste commented 1 year ago

On target, it goes back with same previous error ... somethin i am missing, not logical

image

Fallenbagel commented 1 year ago

On target, it goes back with same previous error ... somethin i am missing, not logical

image

Seems to be related to ubuntu 14.04. The only way I could think of is dockerised or snap builds

nephaste commented 1 year ago

this is my host target (Qnap NAS) not ubuntu 1404, exported compilation in the package

i exported the CC , CXX, etc... for a cross compilation with my toolchain in my script build , but it doesnt take effect ...

export CXX=${HOST}-g++
export LD=${HOST}-ld
export AS=${HOST}-as
export AR=${HOST}-ar
export CC=${HOST}-gcc

do you know if i can crossompile with Yarn (npm) i dont find infromation on this ?

Fallenbagel commented 1 year ago

do you know if i can crossompile with Yarn (npm) i dont find infromation on this ?

I found this but its to cross-compile to arm. Might be able to adapt? https://chrislea.com/2018/08/20/cross-compiling-node-js-for-arm-on-ubuntu/

nephaste commented 1 year ago

thanks, but seems to cross compile nodejs it self and a nodejs application with his modules... will check if i can use my MUSL framwork to build it under an Alpine OS

nephaste commented 1 year ago

Finally able to start with Alpine ELF but crash ... I am definitively unlucky

image

Fallenbagel commented 1 year ago

Finally able to start with Alpine ELF but crash ... I am definitively unlucky

image

Which node version is this?

nephaste commented 12 months ago

Hi Finally, fixed this issue by cross compiling correctly sqlite3

basically here are instruction done, where ${HOST} is my toolchain

export npm_config_build_from_source=true

export CC=${HOST}-cc export CXX=${HOST}-g++

CYPRESS_INSTALL_BINARY=0 CC=${HOST}-cc CXX=${HOST}-g++ npm_config_build_from_source=true npm_config_build_from_source=sqlite3 ../bin/yarn install --frozen-lockfile --network-timeout 1000000 ; CC=${HOST}-cc CXX=${HOST}-g++ npm_config_build_from_source=true npm_config_build_from_source=sqlite3 ../bin/yarn run build ;