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

Build Error #365

Open
TheDogHusky opened this issue Jun 14, 2024 · 6 comments
Open

Build Error #365

TheDogHusky opened this issue Jun 14, 2024 · 6 comments

Comments

@TheDogHusky
Copy link

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.

@TheDogHusky
Copy link
Author

Fixed this error by installing node 12.7 (I'm using NVM, so I can just install it and still use 22.3)

@TheDogHusky
Copy link
Author

@TheDogHusky TheDogHusky changed the title Error: Cannot find module 'node_modules/node-gtk/lib/binding/node-v127-linux-x64/node_gtk.node' Build Error Jun 16, 2024
@TheDogHusky
Copy link
Author

I got it to run with node 18 and 16. Seems like it can't run node 22.3

@romgrk
Copy link
Owner

romgrk commented Aug 15, 2024

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.

@TheDogHusky
Copy link
Author

TheDogHusky commented Sep 18, 2024

image
403 while trying to build. (on both node 12, 14 and 16.)

@romgrk
Copy link
Owner

romgrk commented Sep 19, 2024

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:
image

That's as much as I can do, I should probably mark the project as low-maintenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants