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

problem with npm rebuild #3

Closed
X-Mort-X opened this issue Nov 3, 2014 · 26 comments
Closed

problem with npm rebuild #3

X-Mort-X opened this issue Nov 3, 2014 · 26 comments

Comments

@X-Mort-X
Copy link

X-Mort-X commented Nov 3, 2014

hey guys, im trying to build this on raspberry pi and i run into problems im hoping you guys can help with:

pi@raspberrypi ~/HAP-NodeJS $ npm rebuild

curve25519@1.0.0 install /home/pi/HAP-NodeJS/node_modules/curve25519
node-gyp rebuild

make: Entering directory '/home/pi/HAP-NodeJS/node_modules/curve25519/build'
CXX(target) Release/obj.target/curve/node_curve.o
SOLINK_MODULE(target) Release/obj.target/curve.node
SOLINK_MODULE(target) Release/obj.target/curve.node: Finished
COPY Release/curve.node
make: Leaving directory '/home/pi/HAP-NodeJS/node_modules/curve25519/build'

bignum@0.6.1 install /home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum
node-gyp configure build

make: Entering directory '/home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum/build'
make: Nothing to be done for 'all'.
make: Leaving directory '/home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum/build'
curve25519@1.0.0 /home/pi/HAP-NodeJS/node_modules/curve25519
js-nacl@0.6.0 /home/pi/HAP-NodeJS/node_modules/js-nacl
node-hkdf@0.0.1 /home/pi/HAP-NodeJS/node_modules/node-hkdf
vows@0.5.13 /home/pi/HAP-NodeJS/node_modules/node-hkdf/node_modules/vows
eyes@0.1.8 /home/pi/HAP-NodeJS/node_modules/node-hkdf/node_modules/vows/node_modules/eyes
node-persist@0.0.2 /home/pi/HAP-NodeJS/node_modules/node-persist
mkdirp@0.3.5 /home/pi/HAP-NodeJS/node_modules/node-persist/node_modules/mkdirp
underscore@1.4.4 /home/pi/HAP-NodeJS/node_modules/node-persist/node_modules/underscore
sugar@1.3.9 /home/pi/HAP-NodeJS/node_modules/node-persist/node_modules/sugar
srp@0.2.0 /home/pi/HAP-NodeJS/node_modules/srp
bignum@0.6.1 /home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum

pi@raspberrypi ~/HAP-NodeJS $ node Core.js

module.js:340
throw err;
^
Error: Cannot find module 'mdns'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/pi/HAP-NodeJS/Advertiser.js:1:74)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

pi@raspberrypi ~/HAP-NodeJS $ npm install mdns
npm WARN package.json curve25519@1.0.0 No repository field.
/

mdns@2.2.1 install /home/pi/HAP-NodeJS/node_modules/mdns
node-gyp rebuild

make: Entering directory '/home/pi/HAP-NodeJS/node_modules/mdns/build'
CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
In file included from ../src/dns_sd.cpp:1:0:
../src/mdns.hpp:31:20: fatal error: dns_sd.h: No such file or directory
compilation terminated.
dns_sd_bindings.target.mk:128: recipe for target 'Release/obj.target/dns_sd_bindings/src/dns_sd.o' failed
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: Leaving directory '/home/pi/HAP-NodeJS/node_modules/mdns/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.12.28+
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/HAP-NodeJS/node_modules/mdns
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok

npm ERR! mdns@2.2.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mdns@2.2.1 install script.
npm ERR! This is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls mdns
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.12.28+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "mdns"
npm ERR! cwd /home/pi/HAP-NodeJS
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

i know im probably making a noob error but id love some help lol

@Alpha200
Copy link

Alpha200 commented Nov 3, 2014

Did you run sudo apt-get install libavahi-compat-libdnssd-dev before npm rebuild?

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

ha nope ill try that now

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

pi@raspberrypi ~/HAP-NodeJS $ sudo apt-get install libavahi-compat-libdnssd-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libavahi-client-dev libavahi-common-dev libavahi-compat-libdnssd1
libdbus-1-dev
The following NEW packages will be installed:
libavahi-client-dev libavahi-common-dev libavahi-compat-libdnssd-dev
libavahi-compat-libdnssd1 libdbus-1-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 453 kB of archives.
After this operation, 1,346 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libavahi-compat-libdnssd1 armhf 0.6.31-2 [45.1 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libavahi-common-dev armhf 0.6.31-2 [68.5 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libdbus-1-dev armhf 1.6.8-1+deb7u4 [214 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libavahi-client-dev armhf 0.6.31-2 [62.3 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libavahi-compat-libdnssd-dev armhf 0.6.31-2 [62.8 kB]
Fetched 453 kB in 0s (620 kB/s)
Selecting previously unselected package libavahi-compat-libdnssd1:armhf.
(Reading database ... 73500 files and directories currently installed.)
Unpacking libavahi-compat-libdnssd1:armhf (from .../libavahi-compat-libdnssd1_0.6.31-2_armhf.deb) ...
Selecting previously unselected package libavahi-common-dev.
Unpacking libavahi-common-dev (from .../libavahi-common-dev_0.6.31-2_armhf.deb) ...
Selecting previously unselected package libdbus-1-dev.
Unpacking libdbus-1-dev (from .../libdbus-1-dev_1.6.8-1+deb7u4_armhf.deb) ...
Selecting previously unselected package libavahi-client-dev.
Unpacking libavahi-client-dev (from .../libavahi-client-dev_0.6.31-2_armhf.deb) ...
Selecting previously unselected package libavahi-compat-libdnssd-dev.
Unpacking libavahi-compat-libdnssd-dev (from .../libavahi-compat-libdnssd-dev_0.6.31-2_armhf.deb) ...
Setting up libavahi-compat-libdnssd1:armhf (0.6.31-2) ...
Setting up libavahi-common-dev (0.6.31-2) ...
Setting up libdbus-1-dev (1.6.8-1+deb7u4) ...
Setting up libavahi-client-dev (0.6.31-2) ...
Setting up libavahi-compat-libdnssd-dev (0.6.31-2) ...
pi@raspberrypi ~/HAP-NodeJS $ npm rebuild

curve25519@1.0.0 install /home/pi/HAP-NodeJS/node_modules/curve25519
node-gyp rebuild

make: Entering directory '/home/pi/HAP-NodeJS/node_modules/curve25519/build'
CXX(target) Release/obj.target/curve/node_curve.o
SOLINK_MODULE(target) Release/obj.target/curve.node
SOLINK_MODULE(target) Release/obj.target/curve.node: Finished
COPY Release/curve.node
make: Leaving directory '/home/pi/HAP-NodeJS/node_modules/curve25519/build'

bignum@0.6.1 install /home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum
node-gyp configure build

make: Entering directory '/home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum/build'
make: Nothing to be done for 'all'.
make: Leaving directory '/home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum/build'
curve25519@1.0.0 /home/pi/HAP-NodeJS/node_modules/curve25519
js-nacl@0.6.0 /home/pi/HAP-NodeJS/node_modules/js-nacl
node-hkdf@0.0.1 /home/pi/HAP-NodeJS/node_modules/node-hkdf
vows@0.5.13 /home/pi/HAP-NodeJS/node_modules/node-hkdf/node_modules/vows
eyes@0.1.8 /home/pi/HAP-NodeJS/node_modules/node-hkdf/node_modules/vows/node_modules/eyes
node-persist@0.0.2 /home/pi/HAP-NodeJS/node_modules/node-persist
mkdirp@0.3.5 /home/pi/HAP-NodeJS/node_modules/node-persist/node_modules/mkdirp
underscore@1.4.4 /home/pi/HAP-NodeJS/node_modules/node-persist/node_modules/underscore
sugar@1.3.9 /home/pi/HAP-NodeJS/node_modules/node-persist/node_modules/sugar
srp@0.2.0 /home/pi/HAP-NodeJS/node_modules/srp
bignum@0.6.1 /home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum
pi@raspberrypi ~/HAP-NodeJS $ node Core.js

module.js:340
throw err;
^
Error: Cannot find module 'mdns'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/pi/HAP-NodeJS/Advertiser.js:1:74)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

thats the response i receive :) again im sure this is something im doing lol but thanks for trying to help :)

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

think i got it
i ran:
npm install mdns
npm rebuild

and this is the response i get

pi@raspberrypi ~/HAP-NodeJS $ node Core.js
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
HAP-NodeJS starting...
Cannot find secret key, creating One...
TCP server accepting connection on port: 51822
HAP Server is listening

(this was after i ran your suggestion btw)

@quiquoi
Copy link

quiquoi commented Nov 3, 2014

hello i'll have some error :

after npm rebuild :

mdns@2.2.0 install /home/cm1204/HAP-NodeJS/node_modules/mdns
node-gyp rebuild

sh: 1: node-gyp: not found

npm ERR! mdns@2.2.0 install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 127
npm ERR!
npm ERR! Failed at the mdns@2.2.0 install script.
npm ERR! This is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls mdns
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.2.0-70-generic-pae
npm ERR! command "node" "/usr/bin/npm" "rebuild"
npm ERR! cwd /home/cm1204/HAP-NodeJS
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message mdns@2.2.0 install: node-gyp rebuild
npm ERR! message sh "-c" "node-gyp rebuild" failed with 127
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/cm1204/HAP-NodeJS/npm-debug.log
npm not ok

but i'll run before :
sudo apt-get install libavahi-compat-libdnssd-dev

and after node Core.js
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unable to load shared library /home/cm1204/HAP-NodeJS/node_modules/mdns/build/Release/dns_sd_bindings.node
at Object..node (module.js:472:11)
at Module.load (module.js:348:32)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (/home/cm1204/HAP-NodeJS/node_modules/mdns/lib/dns_sd.js:24:20)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:32)
at Function._load (module.js:308:12)
cm1204@cm1204-VirtualBox:~/HAP-NodeJS$

how resolve it ?

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

run
sudo apt-get install libavahi-compat-libdnssd-dev
then
npm install mdns
npm rebuild
then
node Core.js

let me know if that worked?

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

im now stuck until i get apple ios developer program lol

@quiquoi
Copy link

quiquoi commented Nov 3, 2014

this error now :
after npm rebuild :

curve25519@1.0.0 install /home/cm1204/HAP-NodeJS/node_modules/curve25519
node-gyp rebuild

make: entrant dans le répertoire « /home/cm1204/HAP-NodeJS/node_modules/curve25519/build »
CXX(target) Release/obj.target/curve/node_curve.o
make: g++ : commande introuvable
make: *** [Release/obj.target/curve/node_curve.o] Erreur 127
make: quittant le répertoire « /home/cm1204/HAP-NodeJS/node_modules/curve25519/build »
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.2.0-70-generic-pae
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/cm1204/HAP-NodeJS/node_modules/curve25519
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok

npm ERR! curve25519@1.0.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the curve25519@1.0.0 install script.
npm ERR! This is most likely a problem with the curve25519 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls curve25519
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-70-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "rebuild"
npm ERR! cwd /home/cm1204/HAP-NodeJS
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/cm1204/HAP-NodeJS/npm-debug.log
npm ERR! not ok code 0

and afetr node Core.js :

module.js:340
throw err;
^
Error: Cannot find module 'mdns'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/cm1204/HAP-NodeJS/Advertiser.js:1:74)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

are you in the hap-nodejs directory?

@quiquoi
Copy link

quiquoi commented Nov 3, 2014

yes

@X-Mort-X
Copy link
Author

X-Mort-X commented Nov 3, 2014

i edited the steps above just after posting them, you saw those right? if you did then im no expert haha i have no clue what the commands actually mean so you best bet is to pop back over to siriproxy issue #542 (i think) and direct them here to help you :)

@quiquoi
Copy link

quiquoi commented Nov 3, 2014

ok now it's good also i think : i've this message

*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister
HAP-NodeJS starting...
TCP server accepting connection on port: 51826
HAP Server is listening

is it good ?
my iPhone dont' see accesories

@connyg
Copy link

connyg commented Nov 3, 2014

Yes, I think. I get that warning stuff, too.

@quiquoi
Copy link

quiquoi commented Nov 3, 2014

and your iPhone see the accesories ?

@connyg
Copy link

connyg commented Nov 3, 2014

Yes. You installed the HomeKitDemo app on the phone?
I remember that it did not work immediately, but I can't recall, what it was.

Von: quiquoi <notifications@github.commailto:notifications@github.com>
Antworten an: KhaosT/HAP-NodeJS <reply@reply.github.commailto:reply@reply.github.com>
Datum: Montag, 3. November 2014 19:25
An: KhaosT/HAP-NodeJS <HAP-NodeJS@noreply.github.commailto:HAP-NodeJS@noreply.github.com>
Cc: Konrad Güßbacher <konrad@guessbacher.demailto:konrad@guessbacher.de>
Betreff: Re: [HAP-NodeJS] problem with npm rebuild (#3)

and your iPhone see the accesories ?


Reply to this email directly or view it on GitHubhttps://github.com/KhaosT/HAP-NodeJS/issues/3#issuecomment-61523501.

@quiquoi
Copy link

quiquoi commented Nov 3, 2014

yes HomekitDemo is in my phone ... but nothing ask me to pair with accesoiries !

@KhaosT
Copy link
Contributor

KhaosT commented Nov 3, 2014

Can you try to run this on your iPhone and see if bonjour browser can discover the hap service on your computer?

@quiquoi
Copy link

quiquoi commented Nov 3, 2014

i try iNet and in :
bonjour services > No services detected

it's not good no ?

@KhaosT
Copy link
Contributor

KhaosT commented Nov 3, 2014

@quiquoi That's strange, the service publish should be finished when you saw those warnings.

@quiquoi
Copy link

quiquoi commented Nov 4, 2014

After a reboot of the computer, everything is OK! thank you
by cons is it possible to add another accessory that is not a lamp?

I ordered my electric shutters, is it possible to include in HAP-NodeJS?
if so how

thank you

@schlickspringer
Copy link

any idea how to participate / using this bridge without an iOS developer account i.e. installing an own app?

@quiquoi
Copy link

quiquoi commented Nov 4, 2014

I do not know if this is possible!
I have a developer account

@nathreed
Copy link

nathreed commented Nov 4, 2014

@schlickspringer There is no way to use the devices from the bridge without installing the custom app.

Sent from my iPhone

On Nov 4, 2014, at 5:22 AM, schlickspringer notifications@github.com wrote:

any idea how to participate / using this bridge without an iOS developer account i.e. installing an own app?


Reply to this email directly or view it on GitHub.

@KhaosT
Copy link
Contributor

KhaosT commented Nov 4, 2014

@quiquoi Glad it finally works ^^
@schlickspringer Right now I don't think there is any kind of HomeKit app available on App Store. Sadly, a developer account with iDP is required to try HomeKit app on iOS (unless jailbreak the device).

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

7 participants