igorklopov / enclose

Compile your Node.js project into an executable
http://enclosejs.com
Other
936 stars 43 forks source link

Run time error on raspberry pi #73

Closed tpaskett closed 8 years ago

tpaskett commented 8 years ago

I get this error when trying to run enclose on raspberry pi / raspbian / jesse:

/usr/local/lib/node_modules/enclose/bin/enclose.js:59 if (!bjs[v]) v = "v" + v; ^ TypeError: Cannot read property 'default' of undefined at get_version_obj (/usr/local/lib/node_modules/enclose/bin/enclose.js:59:11) at exec (/usr/local/lib/node_modules/enclose/bin/enclose.js:144:21) at Object. (/usr/local/lib/node_modules/enclose/bin/enclose.js:269:3) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3

hanhealthy commented 8 years ago

get the same question, any one ideas?

igorklopov commented 8 years ago

Please run git clone https://github.com/igorklopov/enclose then cd enclose then npm install. And retry. At least there will be more informative message.

tpaskett commented 8 years ago

Here is the output:

/root/enclose/bin/enclose.js:119 if (error) throw error; ^ Error: Bad version 'default' or suffix 'linux-armv6' or architecture 'armv6'. See file 'binaries.json' at exec (/root/enclose/bin/enclose.js:149:15) at Object. (/root/enclose/bin/enclose.js:351:3) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3

On Jan 2, 2016, at 9:26 AM, Igor Klopov notifications@github.com wrote:

Please run git clone https://github.com/igorklopov/enclose then cd enclose then npm install. And retry. At least there will be more informative message.

— Reply to this email directly or view it on GitHub.

hanhealthy commented 8 years ago

Hi, I clone and run ,get this response, still not work

pi@raspberrypi ~/enclose/bin $ node enclose.js

/home/pi/enclose/bin/enclose.js:119

  if (error) throw error;

                   ^

Error: Bad version 'default' or suffix 'linux-armv6' or architecture 'armv6'. See file 'binaries.json'

at exec (/home/pi/enclose/bin/enclose.js:149:15)

at Object.<anonymous> (/home/pi/enclose/bin/enclose.js:351:3)

at Module._compile (module.js:460:26)

at Object.Module._extensions..js (module.js:478:10)

at Module.load (module.js:355:32)

at Function.Module._load (module.js:310:12)

at Function.Module.runMain (module.js:501:10)

at startup (node.js:129:16)

at node.js:814:3

On Sun, Jan 3, 2016 at 12:26 AM, Igor Klopov notifications@github.com wrote:

Please run git clone https://github.com/igorklopov/enclose then cd enclose then npm install. And retry. At least there will be more informative message.

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168403778.

祝好!

Han JianKang

SenseHuge Co. Limited

WuXi,JiangSu,China

igorklopov commented 8 years ago

Hi. Probably, you both use Raspberry B+ (or earlier edition), that has armv6 processor. I do not include armv6 binaries in release because it is extremely slow to build using Raspberry (and because i did not buy Raspberry B+, only Raspberry 2). It is also rather time-consuming to setup cross-compilation. So the only way for me is to buy Raspberry B+ and to include armv6 binaries in release. Please confirm you really need old Raspberry. Can you use modern Rasbperry 2, that has armv7 processor, supported by EncloseJS?

hanhealthy commented 8 years ago

Hi, thanks for your help, I am confirmed that I am using Raspberry Pi2 to run enclosejs, and

cat /proc/cpuinfo shows:

pi@raspberrypi ~/nodejs $ cat /proc/cpuinfo

processor : 0

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 1

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 2

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 3

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

Hardware : BCM2709

Revision : a21041

Serial : 0000000041e56cb8

But, ni node, process.config is :

process.config

{ target_defaults:

{ cflags: [],

 default_configuration: 'Release',

 defines: [],

 include_dirs: [],

 libraries: [] },

variables:

{ arm_float_abi: 'hard',

 arm_fpu: 'vfpv3',

 arm_neon: 0,

 arm_thumb: 0,

 arm_version: '6',

 clang: 0,

 gcc_version: 46,

 host_arch: 'arm',

 icu_small: false,

 node_install_npm: true,

 node_prefix: '',

 node_shared_cares: false,

 node_shared_http_parser: false,

 node_shared_libuv: false,

 node_shared_openssl: false,

 node_shared_v8: false,

 node_shared_zlib: false,

 node_tag: '',

 node_use_dtrace: false,

 node_use_etw: false,

 node_use_mdb: false,

 node_use_openssl: true,

 node_use_perfctr: false,

 openssl_no_asm: 0,

 python: '/usr/bin/python',

 target_arch: 'arm',

 uv_library: 'static_library',

 uv_parent_path: '/deps/uv/',

 uv_use_dtrace: false,

 v8_enable_gdbjit: 0,

 v8_enable_i18n_support: 0,

 v8_no_strict_aliasing: 1,

 v8_optimized_debug: 0,

 v8_random_seed: 0,

 v8_use_snapshot: true,

 want_separate_host_toolset: 0 } }

shows is armv6, is that strange?

On Mon, Jan 4, 2016 at 7:23 PM, Igor Klopov notifications@github.com wrote:

Hi. Probably, you both use Raspberry B+ (or earlier edition), that has armv6 processor. I do not include armv6 binaries in release because it is extremely slow to build using Raspberry (and because i did not buy Raspberry B+, only Raspberry 2). It is also rather time-consuming to setup cross-compilation. So the only way for me is to buy Raspberry B+ and to include armv6 binaries in release. Please confirm you really need old Raspberry. Can you use modern Rasbperry 2, that has armv7 processor, supported by EncloseJS.

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168651352.

祝好!

Han JianKang

SenseHuge Co. Limited

WuXi,JiangSu,China

hanhealthy commented 8 years ago

On Mon, Jan 4, 2016 at 7:23 PM, Igor Klopov notifications@github.com wrote:

Hi. Probably, you both use Raspberry B+ (or earlier edition), that has armv6 processor. I do not include armv6 binaries in release because it is extremely slow to build using Raspberry (and because i did not buy Raspberry B+, only Raspberry 2). It is also rather time-consuming to setup cross-compilation. So the only way for me is to buy Raspberry B+ and to include armv6 binaries in release. Please confirm you really need old Raspberry.

you said,

Can you use modern Rasbperry 2, that has armv7 processor, supported by EncloseJS.

what OS are you running on Raspberry Pi2, Raspbian or any other ones?

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168651352.

祝好!

Han JianKang

SenseHuge Co. Limited

WuXi,JiangSu,China

igorklopov commented 8 years ago

Node.js has separate installations for armv6 and armv7. https://nodejs.org/en/download/

Seems that you downloaded and installed armv6 node (it runs fine on armv7). Please try to install armv7 node.

Пользователь hanhealthy notifications@github.com писал:

Hi, thanks for your help, I am confirmed that I am using Raspberry Pi2 to run enclosejs, and

cat /proc/cpuinfo shows:

pi@raspberrypi ~/nodejs $ cat /proc/cpuinfo

processor : 0

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 1

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 2

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 3

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

Hardware : BCM2709

Revision : a21041

Serial : 0000000041e56cb8

But, ni node, process.config is :

process.config

{ target_defaults:

{ cflags: [],

default_configuration: 'Release',

defines: [],

include_dirs: [],

libraries: [] },

variables:

{ arm_float_abi: 'hard',

arm_fpu: 'vfpv3',

arm_neon: 0,

arm_thumb: 0,

arm_version: '6',

clang: 0,

gcc_version: 46,

host_arch: 'arm',

icu_small: false,

node_install_npm: true,

node_prefix: '',

node_shared_cares: false,

node_shared_http_parser: false,

node_shared_libuv: false,

node_shared_openssl: false,

node_shared_v8: false,

node_shared_zlib: false,

node_tag: '',

node_use_dtrace: false,

node_use_etw: false,

node_use_mdb: false,

node_use_openssl: true,

node_use_perfctr: false,

openssl_no_asm: 0,

python: '/usr/bin/python',

target_arch: 'arm',

uv_library: 'static_library',

uv_parent_path: '/deps/uv/',

uv_use_dtrace: false,

v8_enable_gdbjit: 0,

v8_enable_i18n_support: 0,

v8_no_strict_aliasing: 1,

v8_optimized_debug: 0,

v8_random_seed: 0,

v8_use_snapshot: true,

want_separate_host_toolset: 0 } }

shows is armv6, is that strange?

On Mon, Jan 4, 2016 at 7:23 PM, Igor Klopov notifications@github.com wrote:

Hi. Probably, you both use Raspberry B+ (or earlier edition), that has armv6 processor. I do not include armv6 binaries in release because it is extremely slow to build using Raspberry (and because i did not buy Raspberry B+, only Raspberry 2). It is also rather time-consuming to setup cross-compilation. So the only way for me is to buy Raspberry B+ and to include armv6 binaries in release. Please confirm you really need old Raspberry. Can you use modern Rasbperry 2, that has armv7 processor, supported by EncloseJS.

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168651352.

祝好!

Han JianKang

SenseHuge Co. Limited

WuXi,JiangSu,China

— Reply to this email directly or view it on GitHub.

hanhealthy commented 8 years ago

thanks a lot for your help , eh...,but another stupid question:

how do I install armv7 version nodejs ? The situation is I have downloaded armv7 version binaries, but when I run the "node" in bin directory and exec "process.config", the arm version still show "6", So your enclose still not work. Any ideas?

Thanks for your time.

On Mon, Jan 4, 2016 at 8:17 PM, Igor Klopov notifications@github.com wrote:

Node.js has separate installations for armv6 and armv7. https://nodejs.org/en/download/

Seems that you downloaded and installed armv6 node (it runs fine on armv7). Please try to install armv7 node.

Пользователь hanhealthy notifications@github.com писал:

Hi, thanks for your help, I am confirmed that I am using Raspberry Pi2 to run enclosejs, and

cat /proc/cpuinfo shows:

pi@raspberrypi ~/nodejs $ cat /proc/cpuinfo

processor : 0

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 1

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 2

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 3

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

Hardware : BCM2709

Revision : a21041

Serial : 0000000041e56cb8

But, ni node, process.config is :

process.config

{ target_defaults:

{ cflags: [],

default_configuration: 'Release',

defines: [],

include_dirs: [],

libraries: [] },

variables:

{ arm_float_abi: 'hard',

arm_fpu: 'vfpv3',

arm_neon: 0,

arm_thumb: 0,

arm_version: '6',

clang: 0,

gcc_version: 46,

host_arch: 'arm',

icu_small: false,

node_install_npm: true,

node_prefix: '',

node_shared_cares: false,

node_shared_http_parser: false,

node_shared_libuv: false,

node_shared_openssl: false,

node_shared_v8: false,

node_shared_zlib: false,

node_tag: '',

node_use_dtrace: false,

node_use_etw: false,

node_use_mdb: false,

node_use_openssl: true,

node_use_perfctr: false,

openssl_no_asm: 0,

python: '/usr/bin/python',

target_arch: 'arm',

uv_library: 'static_library',

uv_parent_path: '/deps/uv/',

uv_use_dtrace: false,

v8_enable_gdbjit: 0,

v8_enable_i18n_support: 0,

v8_no_strict_aliasing: 1,

v8_optimized_debug: 0,

v8_random_seed: 0,

v8_use_snapshot: true,

want_separate_host_toolset: 0 } }

shows is armv6, is that strange?

On Mon, Jan 4, 2016 at 7:23 PM, Igor Klopov notifications@github.com wrote:

Hi. Probably, you both use Raspberry B+ (or earlier edition), that has armv6 processor. I do not include armv6 binaries in release because it is extremely slow to build using Raspberry (and because i did not buy Raspberry B+, only Raspberry 2). It is also rather time-consuming to setup cross-compilation. So the only way for me is to buy Raspberry B+ and to include armv6 binaries in release. Please confirm you really need old Raspberry. Can you use modern Rasbperry 2, that has armv7 processor, supported by EncloseJS.

— Reply to this email directly or view it on GitHub <https://github.com/igorklopov/enclose/issues/73#issuecomment-168651352 .

祝好!

Han JianKang

SenseHuge Co. Limited

WuXi,JiangSu,China

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168663900.

祝好!Best!

Han JianKang

serkanp commented 8 years ago

Are you using raspberry pi b+ ? Its armv6, not armv7 Only raspberry pi 2 is armv7 So, it will not work on armv6 :) But maybe igor can compile armv6 version ..

From: hanhealthy notifications@github.com Reply-To: igorklopov/enclose reply@reply.github.com Date: Monday 4 January 2016 15:02 To: igorklopov/enclose enclose@noreply.github.com Subject: Re: [enclose] Run time error on raspberry pi (#73)

thanks a lot for your help , eh...,but another stupid question:

how do I install armv7 version nodejs ? The situation is I have downloaded armv7 version binaries, but when I run the "node" in bin directory and exec "process.config", the arm version still show "6", So your enclose still not work. Any ideas?

Thanks for your time.

On Mon, Jan 4, 2016 at 8:17 PM, Igor Klopov notifications@github.com wrote:

Node.js has separate installations for armv6 and armv7. https://nodejs.org/en/download/

Seems that you downloaded and installed armv6 node (it runs fine on armv7). Please try to install armv7 node.

Пользователь hanhealthy notifications@github.com писал:

Hi, thanks for your help, I am confirmed that I am using Raspberry Pi2 to run enclosejs, and

cat /proc/cpuinfo shows:

pi@raspberrypi ~/nodejs $ cat /proc/cpuinfo

processor : 0

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 1

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 2

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 3

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

Hardware : BCM2709

Revision : a21041

Serial : 0000000041e56cb8

But, ni node, process.config is :

process.config

{ target_defaults:

{ cflags: [],

default_configuration: 'Release',

defines: [],

include_dirs: [],

libraries: [] },

variables:

{ arm_float_abi: 'hard',

arm_fpu: 'vfpv3',

arm_neon: 0,

arm_thumb: 0,

arm_version: '6',

clang: 0,

gcc_version: 46,

host_arch: 'arm',

icu_small: false,

node_install_npm: true,

node_prefix: '',

node_shared_cares: false,

node_shared_http_parser: false,

node_shared_libuv: false,

node_shared_openssl: false,

node_shared_v8: false,

node_shared_zlib: false,

node_tag: '',

node_use_dtrace: false,

node_use_etw: false,

node_use_mdb: false,

node_use_openssl: true,

node_use_perfctr: false,

openssl_no_asm: 0,

python: '/usr/bin/python',

target_arch: 'arm',

uv_library: 'static_library',

uv_parent_path: '/deps/uv/',

uv_use_dtrace: false,

v8_enable_gdbjit: 0,

v8_enable_i18n_support: 0,

v8_no_strict_aliasing: 1,

v8_optimized_debug: 0,

v8_random_seed: 0,

v8_use_snapshot: true,

want_separate_host_toolset: 0 } }

shows is armv6, is that strange?

On Mon, Jan 4, 2016 at 7:23 PM, Igor Klopov notifications@github.com wrote:

Hi. Probably, you both use Raspberry B+ (or earlier edition), that has armv6 processor. I do not include armv6 binaries in release because it is extremely slow to build using Raspberry (and because i did not buy Raspberry B+, only Raspberry 2). It is also rather time-consuming to setup cross-compilation. So the only way for me is to buy Raspberry B+ and to include armv6 binaries in release. Please confirm you really need old Raspberry. Can you use modern Rasbperry 2, that has armv7 processor, supported by EncloseJS.

— Reply to this email directly or view it on GitHub <https://github.com/igorklopov/enclose/issues/73#issuecomment-168651352 .

祝好!

Han JianKang

SenseHuge Co. Limited

WuXi,JiangSu,China

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168663900.

祝好!Best!

Han JianKang

— Reply to this email directly or view it on GitHub.

serkanp commented 8 years ago

ok i saw that you are using rpi2 :) try to install latest raspbian https://downloads.raspberrypi.org/raspbian_latest after installing, install latest nodejs for armv7 from https://nodejs.org/dist/v4.2.4/node-v4.2.4-linux-armv7l.tar.gz or using package manager curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs (if you dont have curl, sudo apt-get install curl)

now you will have armv7 version of nodejs install enclose: sudo apt-get install enclose -g

hanhealthy commented 8 years ago

OK, thanks , I will have a try, thanks for your time

On Mon, Jan 4, 2016 at 10:20 PM, serkanp notifications@github.com wrote:

ok i saw that you are using rpi2 :) try to install latest raspbian https://downloads.raspberrypi.org/raspbian_latest after installing, install latest nodejs for armv7 from https://nodejs.org/dist/v4.2.4/node-v4.2.4-linux-armv7l.tar.gz or using package manager curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs (if you dont have curl, sudo apt-get install curl)

now you will have armv7 version of nodejs install enclose: sudo apt-get install enclose -g

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168689081.

祝好!Best!

Han JianKang

igorklopov commented 8 years ago

I asked node maintainers for help https://github.com/nodejs/node/issues/4531

igorklopov commented 8 years ago

@hanhealthy @tpaskett Please retry cloning and npm installing. Now arm arch is read from /proc/cpuinfo (https://github.com/igorklopov/enclose/commit/9033d4d4e8a5bb837d7c71cea42dcccce321ec9f)

igorklopov commented 8 years ago

@serkanp thanks!

hanhealthy commented 8 years ago

when I package script which contain I2C communication, I get err info below:


/home/pi/nodejs/node_modules/i2c-bus/node_modules/bindings/bindings.js

info Cannot resolve 'require(n)'

Use a string literal as argument for 'require', or leave it

as is and specify the resolved file name in 'scripts' option

error Code 0x619c67a8. Outdated version of EncloseJS. Please update


any ideas?

On Tue, Jan 5, 2016 at 4:05 AM, Igor Klopov notifications@github.com wrote:

@serkanp https://github.com/serkanp thanks!

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168788369.

祝好!Best!

Han JianKang

hanhealthy commented 8 years ago

PS:

Does enclose support I2C(i2c-bus) and GPIO(rpi-gpio) communication module?

On Tue, Jan 5, 2016 at 2:28 PM, 韩健康 hanhealthy@gmail.com wrote:

when I package script which contain I2C communication, I get err info below:


/home/pi/nodejs/node_modules/i2c-bus/node_modules/bindings/bindings.js

info Cannot resolve 'require(n)'

Use a string literal as argument for 'require', or leave it

as is and specify the resolved file name in 'scripts' option

error Code 0x619c67a8. Outdated version of EncloseJS. Please update


any ideas?

On Tue, Jan 5, 2016 at 4:05 AM, Igor Klopov notifications@github.com wrote:

@serkanp https://github.com/serkanp thanks!

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168788369.

祝好!Best!

Han JianKang

祝好!Best!

Han JianKang

igorklopov commented 8 years ago

EncloseJS will support i2c-bs in next release. It will be ready in a day.

hanhealthy commented 8 years ago

Good to hear that, does this version support GPIO operation? please notify me when it's ready.

Thanks in advance.

On Tue, Jan 5, 2016 at 6:15 PM, Igor Klopov notifications@github.com wrote:

EncloseJS will support i2c in next release. It will be ready in a day.

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168963603.

祝好!Best!

Han JianKang

mknj commented 8 years ago

node runs fine on my raspberry B+. Only app startup is slow (~2 seconds for console.log("hello") app ).

Would it be possible to speed up app startup with enclose?

tpaskett commented 8 years ago

I installed fresh on raspberry pi 2 and installed nodejs and git closed and I get this on npm install:

root@raspberrypi:~# npm install enclose \

enclose@1.0.5 postinstall /root/node_modules/enclose node postinstall.js

sh: 1: node: not found npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! enclose@1.0.5 postinstall: node postinstall.js npm ERR! Exit status 127 npm ERR! npm ERR! Failed at the enclose@1.0.5 postinstall script. npm ERR! This is most likely a problem with the enclose package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node postinstall.js npm ERR! You can get their info via: npm ERR! npm owner ls enclose npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.1.13-v7+ npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "enclose" npm ERR! cwd /root npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /root/npm-debug.log npm ERR! not ok code 0

On Jan 4, 2016, at 5:17 AM, Igor Klopov notifications@github.com wrote:

Node.js has separate installations for armv6 and armv7. https://nodejs.org/en/download/

Seems that you downloaded and installed armv6 node (it runs fine on armv7). Please try to install armv7 node.

Пользователь hanhealthy notifications@github.com писал:

Hi, thanks for your help, I am confirmed that I am using Raspberry Pi2 to run enclosejs, and

cat /proc/cpuinfo shows:

pi@raspberrypi ~/nodejs $ cat /proc/cpuinfo

processor : 0

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 1

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 2

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

processor : 3

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 38.40

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

Hardware : BCM2709

Revision : a21041

Serial : 0000000041e56cb8

But, ni node, process.config is :

process.config

{ target_defaults:

{ cflags: [],

default_configuration: 'Release',

defines: [],

include_dirs: [],

libraries: [] },

variables:

{ arm_float_abi: 'hard',

arm_fpu: 'vfpv3',

arm_neon: 0,

arm_thumb: 0,

arm_version: '6',

clang: 0,

gcc_version: 46,

host_arch: 'arm',

icu_small: false,

node_install_npm: true,

node_prefix: '',

node_shared_cares: false,

node_shared_http_parser: false,

node_shared_libuv: false,

node_shared_openssl: false,

node_shared_v8: false,

node_shared_zlib: false,

node_tag: '',

node_use_dtrace: false,

node_use_etw: false,

node_use_mdb: false,

node_use_openssl: true,

node_use_perfctr: false,

openssl_no_asm: 0,

python: '/usr/bin/python',

target_arch: 'arm',

uv_library: 'static_library',

uv_parent_path: '/deps/uv/',

uv_use_dtrace: false,

v8_enable_gdbjit: 0,

v8_enable_i18n_support: 0,

v8_no_strict_aliasing: 1,

v8_optimized_debug: 0,

v8_random_seed: 0,

v8_use_snapshot: true,

want_separate_host_toolset: 0 } }

shows is armv6, is that strange?

On Mon, Jan 4, 2016 at 7:23 PM, Igor Klopov notifications@github.com wrote:

Hi. Probably, you both use Raspberry B+ (or earlier edition), that has armv6 processor. I do not include armv6 binaries in release because it is extremely slow to build using Raspberry (and because i did not buy Raspberry B+, only Raspberry 2). It is also rather time-consuming to setup cross-compilation. So the only way for me is to buy Raspberry B+ and to include armv6 binaries in release. Please confirm you really need old Raspberry. Can you use modern Rasbperry 2, that has armv7 processor, supported by EncloseJS.

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-168651352.

祝好!

Han JianKang

SenseHuge Co. Limited

WuXi,JiangSu,China

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

igorklopov commented 8 years ago

@mknj Yes. I will try to improve startup time. There is room for improvement.

igorklopov commented 8 years ago

@tpaskett You installed node via sudo apt-get install nodejs. This is debian-way. /usr/bin/nodejs is created. See https://nodejs.org/en/download/package-manager/ - you should ln -s /usr/bin/nodejs /usr/bin/node

igorklopov commented 8 years ago

Please reinstall enclosejs to 1.0.6 that was just released. And retry.

tpaskett commented 8 years ago

Ok it works now, thanks!

On Jan 6, 2016, at 7:45 AM, Igor Klopov notifications@github.com wrote:

Please reinstall enclosejs to 1.0.6 that was just released. And retry.

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-169341729.

hanhealthy commented 8 years ago

When I run the compiled program, I got :

*\ Evaluation version. Please subscribe to full version. undefined:0

Error: Cannot find module '/thebox/home/pi/enclose/examples/24-serialport/nodemodules/serialport/build/Release/node-v47-linux-arm/serialport.node' at Error (native) at P (e:0) at f (e:0) at Object.console.+/+t+h+e+b+o+x+/+h+o+m+e+/+p+i+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+2+4+-+s+e+r+i+a+l+p+o+r+t+/+n+o+d+e++m+o+d+u+l+e+s+/+s+e+r+i+a+l+p+o+r+t+/+s+e+r+i+a+l+p+o+r+t+.+j+s.dev (e:0) at r (e:0) at P (e:0) at f (e:0) at Object.console.+/+t+h+e+b+o+x+/+h+o+m+e+/+p+i+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+2+4+-+s+e+r+i+a+l+p+o+r+t+/+i+n+d+e+x+.+j+s.dev (e:0) at r (e:0) at e:0

Any ideas?

igorklopov commented 8 years ago

You seem to have 4.2.4 installed on the system. But trying to compile for 5.3.0 (for example using option -v 5.3.0). Another reason is that you should ship serialport package with your binary. I mean you can cd to the directory of your executable and run npm install serialport there.

hanhealthy commented 8 years ago

Hi, @igorklopov

When I compile package contains 'i2c-bus' and 'rpi-gpio', I got:

pi@raspberrypi:~/enclose/examples/Reader $ ./compilei2c.js

error Code 0x6103e20b. Outdated version of EncloseJS. Please update

Any solutions?

igorklopov commented 8 years ago

@hanhealthy Please retry with 1.0.7

hanhealthy commented 8 years ago

I have updated to 1.0.7 ,compile and run , got :

*\ Evaluation version. Please subscribe to full version.

undefined:0

Error: Could not find module root given file: "/thebox/home/pi/enclose/examples/Reader/node_modules". Do you have a package.json file?

at Function.getRoot (e:0)

at bindings (e:0)

at

Object.console.+/+t+h+e+b+o+x+/+h+o+m+e+/+p+i+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+R+e+a+d+e+r+/+n+o+d+e+_+m+o+d+u+l+e+s+/+e+p+o+l+l+/+e+p+o+l+l+.+j+s.dev (e:0)

at r (e:0)

at P (e:0)

at f (e:0)

at

Object.console.+/+t+h+e+b+o+x+/+h+o+m+e+/+p+i+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+R+e+a+d+e+r+/+n+o+d+e+_+m+o+d+u+l+e+s+/+r+p+i+-+g+p+i+o+/+r+p+i+-+g+p+i+o+.+j+s.dev (e:0)

at r (e:0)

at P (e:0)

at f (e:0)

any ideas?

thanks

On Sun, Jan 10, 2016 at 8:27 AM, Igor Klopov notifications@github.com wrote:

@hanhealthy https://github.com/hanhealthy Please retry with 1.0.7

— Reply to this email directly or view it on GitHub https://github.com/igorklopov/enclose/issues/73#issuecomment-170296565.

祝好!Best!

Han JianKang

hanhealthy commented 8 years ago

And also,I am pretty sure that depended node_module & package.json is under the directory where the compiled package runs.

发自我的 iPhone

在 2016年1月10日,21:54,韩健康 hanhealthy@gmail.com 写道:

I have updated to 1.0.7 ,compile and run , got :

*\ Evaluation version. Please subscribe to full version.

undefined:0

Error: Could not find module root given file: "/thebox/home/pi/enclose/examples/Reader/node_modules". Do you have a package.json file?

at Function.getRoot (e:0)

at bindings (e:0)

at Object.console.+/+t+h+e+b+o+x+/+h+o+m+e+/+p+i+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+R+e+a+d+e+r+/+n+o+d+e+_+m+o+d+u+l+e+s+/+e+p+o+l+l+/+e+p+o+l+l+.+j+s.dev (e:0)

at r (e:0)

at P (e:0)

at f (e:0)

at Object.console.+/+t+h+e+b+o+x+/+h+o+m+e+/+p+i+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+R+e+a+d+e+r+/+n+o+d+e+_+m+o+d+u+l+e+s+/+r+p+i+-+g+p+i+o+/+r+p+i+-+g+p+i+o+.+j+s.dev (e:0)

at r (e:0)

at P (e:0)

at f (e:0)

any ideas?

thanks

On Sun, Jan 10, 2016 at 8:27 AM, Igor Klopov notifications@github.com wrote: @hanhealthy Please retry with 1.0.7

— Reply to this email directly or view it on GitHub.

祝好!Best!

Han JianKang

scramble45 commented 8 years ago

Also encountering : Error: Could not find module root given file: "/thebox/node_code/node_modules". Do you have apackage.jsonfile? at Function.getRoot (e:0) at bindings (e:0) at Object.console.+/+t+h+e+b+o+x+/+n+o+d+e+_+c+o+d+e+/+n+o+d+e+_+m+o+d+u+l+e+s+/+e+p+o+l+l+/+e+p+o+l+l+.+j+s.dev (e:0) at r (e:0) at P (e:0) at f (e:0) at Object.console.+/+t+h+e+b+o+x+/+n+o+d+e+_+c+o+d+e+/+n+o+d+e+_+m+o+d+u+l+e+s+/+r+p+i+-+g+p+i+o+/+r+p+i+-+g+p+i+o+.+j+s.dev (e:0) at r (e:0) at P (e:0) at f (e:0)