Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start pigallery2 after a node upgrade #900

Closed
sugatam opened this issue May 4, 2024 · 7 comments
Closed

Cannot start pigallery2 after a node upgrade #900

sugatam opened this issue May 4, 2024 · 7 comments
Labels

Comments

@sugatam
Copy link

sugatam commented May 4, 2024

I've been running pigallery2 natively on a sbc running debian trixie. A recent upgrade pulled in a new version of node and npm, and now I cannot start the app:

5/4/2024, 10:32:20 AM[WARN_][ConfigDiagnostics] [SQL error] Error: The module '/srv/pigallery2/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 108. This version of Node.js requires NODE_MODULE_VERSION 109. Please try re-compiling or re-installing the module (for instance, usingnpm rebuildornpm install).

I wiped node_modules, cleared the npm cache, did a new npm install and an npm rebuild, all to no avail. Finally, I even did a fresh git pull and build, but I'm still getting this. Any ideas?

@bpatrik
Copy link
Owner

bpatrik commented May 5, 2024 via email

@sugatam
Copy link
Author

sugatam commented May 5, 2024

Thanks for your reply Patrik. I don't think trixie pulled in a new major version of node, its still node v18.

> process.versions
{ 
  node: '18.20.1',
  modules: '109',

and on another installation where I haven't upgraded:

{ 
  node: '18.19.1',
  modules: '108',
}

I'm not familiar with the node dev/release pipeline, but it appears that despite what I'm trying I can't get that one module - better_sqlite3 - to rebuild in the new pipleline.

@martadinata666
Copy link
Contributor

can you please test using -d, npm -d rebuild likely or what I assume is missing build deps and can't build the module from the source.

@sugatam
Copy link
Author

sugatam commented May 6, 2024

Hi, npm -d rebuild didn't help, nor did clearing out node_modules and running

npm install --build-from-source

How can I get more insight into build deps? You may be right in that I can't build better_sqlite3 from source, just want to know why and address that. Messing around with various revisions of better_sqlite3 (9.x.x) led to npm run build failing, so that was a no go.

@martadinata666
Copy link
Contributor

-d is debug mode, so there should be more insight what wrong? or at least why it don't compile from source. Can you please paste the log, here 🤔

@sugatam
Copy link
Author

sugatam commented May 13, 2024

I was able to fix it by

cd node_modules/better_sqlite3
node-gyp rebuild --release 

@bpatrik
Copy link
Owner

bpatrik commented May 14, 2024

Happy to hear. Closing this bug.

@bpatrik bpatrik closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants