node-gtk icon indicating copy to clipboard operation
node-gtk copied to clipboard

Cannot find module node-v127-win32-x64

Open seekcat0 opened this issue 11 months ago • 3 comments

So went me wana create a simple gui exe so me search found its then me try but its say:

error: Cannot find module 'C:\Users\Admin\Desktop\Optimize Roblox\node_modules\node-gtk\lib\binding\node-v127-win32-x64\node_gtk.node' from 'C:\Users\Admin\Desktop\Optimize Roblox\node_modules\node-gtk\lib\native.js'

Bun v1.1.39-canary.39+4c8cbecb0 (Windows x64 baseline)

And its a simple scripts:

const gi = require('node-gtk')
const Gtk = gi.require('Gtk', '3.0')

gi.startLoop()
Gtk.init()

const win = new Gtk.Window()
win.on('destroy', () => Gtk.mainQuit())
win.on('delete-event', () => false)

win.setDefaultSize(200, 80)
win.add(new Gtk.Label({ label: 'Hello Gtk+' }))

win.showAll()
Gtk.main()

How to fix its ? like install node-v127 ? or reininstall node-gtk again ?

seekcat0 avatar Jan 20 '25 09:01 seekcat0

Did you run it with Bun? Also maybe that binary didn't get built.

romgrk avatar Feb 25 '25 21:02 romgrk

Did you run it with Bun? Also maybe that binary didn't get built.

Yeah me run with bun but doesn't work ermm... Console:

C:\Users\<USER>\Desktop\AquaHub>bun run .
error: Cannot find module 'C:\Users\<USER>\Desktop\AquaHub\node_modules\node-gtk\lib\binding\node-v127-win32-x64\node_gtk.node' from 'C:\Users\<USER>\Desktop\AquaHub\node_modules\node-gtk\lib\native.js'

seekcat0 avatar Feb 26 '25 09:02 seekcat0

That would be the first problem, this is a native nodejs project, not bun.

romgrk avatar Feb 26 '25 20:02 romgrk

Closing this, subscribe to #382 for the prebuilt binaries on windows.

romgrk avatar Jul 30 '25 19:07 romgrk