Build Error
I need to make a GTK app in JavaScript (as I don't know python that much and prefer JS) that is a utility to update an operating system named Nyarch.
However, after installation of node-gtk, I came accross an issue:
I made my project, files, and ran it (node src/main), and got a pretty little error from node:
node:internal/modules/cjs/loader:1215
throw err;
^
Error: Cannot find module '/run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/node_modules/node-gtk/lib/binding/node-v127-linux-x64/node_gtk.node'
Require stack:
- /run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/node_modules/node-gtk/lib/native.js
- /run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/node_modules/node-gtk/lib/index.js
- /run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/src/main.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15)
at Module._load (node:internal/modules/cjs/loader:1038:27)
at wrapModuleLoad (node:internal/modules/cjs/loader:212:19)
at Module.require (node:internal/modules/cjs/loader:1297:12)
at require (node:internal/modules/helpers:123:16)
at Object.<anonymous> (/run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/node_modules/node-gtk/lib/native.js:11:17)
at Module._compile (node:internal/modules/cjs/loader:1460:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1544:10)
at Module.load (node:internal/modules/cjs/loader:1275:32)
at Module._load (node:internal/modules/cjs/loader:1091:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/node_modules/node-gtk/lib/native.js',
'/run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/node_modules/node-gtk/lib/index.js',
'/run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/src/main.js'
]
}
Node.js v22.3.0
And node is right, the file node-v127-linux-x64/node_gtk.node does not exist.
Can anyone help me out?
I'm on Arch Linux with Node 22.3.0.
Fixed this error by installing node 12.7 (I'm using NVM, so I can just install it and still use 22.3)
https://safe.classydev.fr/2024_06_14_T12_17_35_551_Z_debug_0-jP3xDRZhI8QEOrHli6rp7PYIaqKM8zXL.log
Failed to build.
I got it to run with node 18 and 16. Seems like it can't run node 22.3
There's no prebuilt binaries for node > 18, I haven't put much time into maintaining the project lately. I'm not sure if it builds from source in node 22, you could try npm run build after checking out & installing the repository. If it builds, then it should be trivial to adjust the GHA config.
403 while trying to build. (on both node 12, 14 and 16.)
I ran again the publishing script, which had failed previously. It has become flaky because I haven't had time to maintain the project, and the virtual environments seem to change occasionally.
It has succeeded for node 16 & 18 on linux:
That's as much as I can do, I should probably mark the project as low-maintenance.