WebReflection / node-gtk

GNOME Gtk+ bindings for NodeJS
MIT License
74 stars 9 forks source link

Problem installing or running #14

Closed Bored0ne closed 8 years ago

Bored0ne commented 8 years ago

I tried to add this with npm and got a couple warnings after remembering to add a package.json, I'm fairly new to node but I didn't think that was absolutely required. also I got this as an error module.js:328 throw err; ^

Error: Cannot find module 'node-gtk' at Function.Module._resolveFilename (module.js:326:15) at Function.Module._load (module.js:277:25) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/home/stephen/Desktop/gtktest/gtktest.js:4:11) at Module._compile (module.js:398:26) at Object.Module._extensions..js (module.js:405:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Function.Module.runMain (module.js:430:10)

I'm running Ubuntu 15.04 and Node 5.4.0

magcius commented 8 years ago

It sounds like you didn't install it properly.

WebReflection commented 8 years ago

The version 0.0.16 was a pre-built binary based on node-pre-gyp but that part has been changed after and right now is not even working.

I've pushed 0.0.17 to npm that should always fallback to the built version. Right now, since this is under development and not ready for prime-time, that should be enough but you might double check all dependencies are satisfied.

pluma commented 8 years ago

The package.json says main is lib/index.js but the lib folder seems to be missing from the npm release. Hence the "cannot find".

WebReflection commented 8 years ago

it worked for me installing it locally ... I'll check again.

WebReflection commented 8 years ago

please try version 0.0.18 and close this if everything is now OK, thanks.

pluma commented 8 years ago

The problem seems to have been fixed in 0.0.18. The import works now.

Instead I get an unrelated error:

node: symbol lookup error: /home/pluma/projects/test/guitest/node_modules/node-gtk/build/Release/node-gtk.node: undefined symbol: g_irepository_get_default

I suspect this is a local problem with missing dependencies. The Readme isn't very clear on what packages I need to install to get node-gtk running on the latest Ubuntu.

I think you can close this issue now.

WebReflection commented 8 years ago

in Ubuntu, with sudo apt-get install gjs you should include automatically needed dependencies but what's most important here is the gobject-introspection.

Give it a try via gjs install first, and see how that goes.