Debugger for Z-Way JavaScript

Discussions about RaZberry - Z-Wave board for Raspberry computer
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: Debugger for Z-Way JavaScript

Post by PoltoS »

Code: Select all

sudo netstat -natp
will show if 8183 is listened. Make sure your tunnel is set up correctly too. config.xml should contain 8183 in debug-port tag
Isaksson
Posts: 133
Joined: 10 Apr 2013 09:43

Re: Debugger for Z-Way JavaScript

Post by Isaksson »

Hello.
Thanks for the support, it was the config.xml that did not have the debug-port.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: How I installed the node, npm & node-inspector on RPi

Post by pz1 »

kambis wrote:I had to spend some hours to find out how to install the node-inspector on my RPi.
For others to have it faster done here how I did it:
I did try the Node installation as root following your well documented instruction.

The first part goes well, but the Inspector installation fails in a loop where it starts loading the node-tar again. After the third cycle I broke the loop with CTRL-C.

Code: Select all

> utf-8-validate@1.1.0 install /opt/node/lib/node_modules/node-inspector/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.26"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/node/lib/node_modules/node-inspector/node_modules/ws/node_modules/utf-8-validate/.node-gyp"
gyp http GET http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz
Update 20150730:
Tried again with an alternative node.js install method found here, that should install the latest node.js. Also this one breaks on the node-inspector install.

Code: Select all

pi@raspberry ~ $ wget http://node-arm.herokuapp.com/node_latest_armhf.deb
--2015-07-30 10:43:32--  http://node-arm.herokuapp.com/node_latest_armhf.deb
Resolving node-arm.herokuapp.com (node-arm.herokuapp.com)... 23.21.97.86
Connecting to node-arm.herokuapp.com (node-arm.herokuapp.com)|23.21.97.86|:80...                                                                               connected.
HTTP request sent, awaiting response... 200 OK
Length: 6728900 (6.4M) [application/x-debian-package]
Saving to: `node_latest_armhf.deb'

100%[======================================>] 6,728,900   1.88M/s   in 3.4s

2015-07-30 10:43:36 (1.88 MB/s) - `node_latest_armhf.deb' saved [6728900/6728900                                                                              ]

pi@raspberry ~ $ sudo dpkg -i node_latest_armhf.deb
Selecting previously unselected package node.
(Reading database ... 71697 files and directories currently installed.)
Unpacking node (from node_latest_armhf.deb) ...
Setting up node (0.12.6-1) ...
Processing triggers for man-db ...
pi@raspberry ~ $ node -v
v0.12.6
pi@raspberry ~ $ npm -v
2.11.2
pi@raspberry ~ $ sudo npm install -g node-inspector
^Cpi@raspberry ~ $
pi@raspberry ~ $ sudo npm install -g node-inspector
\
> v8-profiler@5.2.9 preinstall /usr/local/lib/node_modules/node-inspector/node_modules/v8-profiler
>

-
> v8-debug@0.5.0 preinstall /usr/local/lib/node_modules/node-inspector/node_modules/v8-debug
>

npm WARN optional dep failed, continuing default-browser-id@1.0.2
/
> utf-8-validate@1.1.0 install /usr/local/lib/node_modules/node-inspector/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.6"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/node-inspector/node_modules/ws/node_modules/utf-8-validate/.node-gyp"
make: Entering directory '/usr/local/lib/node_modules/node-inspector/node_modules/ws/node_modules/utf-8-validate/build'
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  COPY Release/validation.node
make: Leaving directory '/usr/local/lib/node_modules/node-inspector/node_modules/ws/node_modules/utf-8-validate/build'
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.6","npm":"2.11.2"})

> bufferutil@1.1.0 install /usr/local/lib/node_modules/node-inspector/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.6"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/node-inspector/node_modules/ws/node_modules/bufferutil/.node-gyp"
^Cpi@raspberry ~ $
pi@raspberry ~ $
The first irregularity I observed both in the first and second attempt was the warning:

Code: Select all

npm WARN optional dep failed, continuing default-browser-id@1.0.2
Problem with linux is that developers always tell you to ignore warnings, but this one seems serious enough to mention I guess :mrgreen:

Update 20150730-2: Installation on Windows 7 no fun either. After successful node installation, it also failed on the node-inspector install

Code: Select all

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\pz>node -v
v0.12.7

C:\Users\pz>npm -v
2.11.3

C:\Users\pz>npm install -g node-inspector
\


> v8-profiler@5.2.9 preinstall C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-profiler
>

|


> v8-debug@0.5.0 preinstall C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
>

npm WARN optional dep failed, continuing default-browser-id@1.0.2
\


> bufferutil@1.1.0 install C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild

|
C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "D:\programfiles\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (D:\programfiles\node_modules\npm\node_modules\node-gyp\lib\configure.js:114:14)
gyp ERR! stack     at D:\programfiles\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:11
gyp ERR! stack     at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "D:\\programfiles\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"})


> utf-8-validate@1.1.0 install C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild

-
C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "D:\programfiles\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (D:\programfiles\node_modules\npm\node_modules\node-gyp\lib\configure.js:114:14)
gyp ERR! stack     at D:\programfiles\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:11
gyp ERR! stack     at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "D:\\programfiles\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil@1.1.0
npm WARN optional dep failed, continuing utf-8-validate@1.1.0

> v8-profiler@5.2.9 install C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-profiler
> node-pre-gyp install --fallback-to-build

[v8-profiler] Success: "C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-profiler\build\profiler\v5.2.9\node-v14-win32-ia32\profiler.
node" is installed via remote

> v8-debug@0.5.0 install C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node-pre-gyp install --fallback-to-build

[v8-debug] Success: "C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v0.5.0\node-v14-win32-ia32\debug.node" is installed via remote
C:\Users\pz\AppData\Roaming\npm\node-debug -> C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\bin\node-debug.js
C:\Users\pz\AppData\Roaming\npm\node-inspector -> C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector\bin\inspector.js
node-inspector@0.12.1 C:\Users\pz\AppData\Roaming\npm\node_modules\node-inspector
+-- path-is-absolute@1.0.0
+-- async@0.9.2
+-- debug@2.2.0 (ms@0.7.1)
+-- serve-favicon@2.3.0 (fresh@0.3.0, ms@0.7.1, parseurl@1.3.0, etag@1.7.0)
+-- semver@4.3.6
+-- strong-data-uri@1.0.1 (truncate@1.0.5)
+-- rc@1.1.0 (ini@1.3.4, strip-json-comments@0.1.3, deep-extend@0.2.11, minimist@1.1.2)
+-- which@1.1.1 (is-absolute@0.1.7)
+-- glob@5.0.14 (inherits@2.0.1, once@1.3.2, inflight@1.0.4, minimatch@2.0.10)
+-- yargs@3.15.0 (decamelize@1.0.0, camelcase@1.1.0, window-size@0.1.2, cliui@2.1.0)
+-- express@4.13.1 (fresh@0.3.0, escape-html@1.0.2, cookie@0.1.3, etag@1.7.0, merge-descriptors@1.0.0, utils-merge@1.0.0, array-flatten@1.1.0, parseurl@1.3.0, methods@1.1.1, cookie-signature@1.0.6, range-parser@1.0.2, path-to-regexp@0.1.6, vary@1.0.1, content-type@1.0.1, serve-static@1.10.0, content-disposition@0.5.0, depd@1.0.1, qs@4.0.0, on-finished@2.3.0, finalhandler@0.4.0, proxy-addr@1.0.8, send@0.13.0, accepts@1.2.11, type-is@1.6.5)
+-- ws@0.7.2 (options@0.0.6, ultron@1.0.2)
+-- biased-opener@0.2.6 (minimist@1.1.0, x-default-browser@0.3.0, browser-launcher2@0.4.5)
+-- v8-profiler@5.2.9 (nan@1.8.4, node-pre-gyp@0.6.9)
+-- v8-debug@0.5.0 (nan@1.8.4, node-pre-gyp@0.6.9)
C:\Users\pz>
NOTE: My Raspberry B has a fresh install on Rasbian release from May 2015\

Update 20150730-3
Tried the install on a fresh plain May 2015 Rasbian image. The installation of node-inspector failed following the same patteren.

Seems node-inspector is not compatible with this Rasbian release

Update 20150731
I found many users complaining about this problem on github. Seems it has something to do with npm or gyp. Someone reported the issue was fixed with node 0.12.4. I'll try to locate that version for Pi. On windows 7 I still had the error in v 0.12.7....

Update 20150731-2
I did find v 0.10.40 ( release 9th July 2015)build. That also ran in the node-gyp problem
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Debugger for Z-Way JavaScript

Post by pz1 »

PoltoS wrote:

Code: Select all

sudo netstat -natp
will show if 8183 is listened. Make sure your tunnel is set up correctly too. config.xml should contain 8183 in debug-port tag
Please update the description in the first post, because it is not mentioned there!
I quess this must be edited after every version update?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Debugger for Z-Way JavaScript

Post by pz1 »

Isaksson wrote:Hello.
Thanks for the support, it was the config.xml that did not have the debug-port.
Could you tell me which Rasbian you are using? I can't get node-inspector installed
Isaksson
Posts: 133
Joined: 10 Apr 2013 09:43

Re: Debugger for Z-Way JavaScript

Post by Isaksson »

Linux version 3.18.16-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #796 SMP PREEMPT Fri Jun 19 22:18:53 BST 2015

iam now going to install it on my developer pi.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Debugger for Z-Way JavaScript

Post by pz1 »

Isaksson wrote:Linux version 3.18.16-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #796 SMP PREEMPT Fri Jun 19 22:18:53 BST 2015
Apparantly I am on a different platform. My May 2015 standard Rasbian is on linux 3.18.11-v7+ and 3.18.11+ for Raspi2 and RaspiB respectively.
Isaksson
Posts: 133
Joined: 10 Apr 2013 09:43

Re: Debugger for Z-Way JavaScript

Post by Isaksson »

I have now installed node-inspector on my developer machine.
One problem is that it seems that zway is not compatible with the new version of node-inspector 0.12.1 (not the error that you describe pz1 but it crashes when running).
So i did install the older version that i know is working.

Code: Select all

npm install -g node-inspector@0.11.0
and now i have it up and running att thi machine also.

pz1, maybe you should try this command before you try to install node-inspector

Code: Select all

npm set prefix ~/npm
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Debugger for Z-Way JavaScript

Post by pz1 »

Isaksson wrote:pz1, maybe you should try this command before you try to install node-inspector

Code: Select all

npm set prefix ~/npm
Ended with the same problem:
Attachments
Gyp.PNG
Gyp.PNG (6.52 KiB) Viewed 17585 times
Isaksson
Posts: 133
Joined: 10 Apr 2013 09:43

Re: Debugger for Z-Way JavaScript

Post by Isaksson »

Are you using the standard account pi for this installation and also run the command npm install node-inspector without sudo?
Post Reply