@Sergiy-Kyrylkov update your Firmware with oupgrade
and update opkg with opkg update
and then install nodejs with
opkg install nodejs
.
Philipp Czarnetzki
@Philipp Czarnetzki
Best posts made by Philipp Czarnetzki
Latest posts made by Philipp Czarnetzki
-
RE: JavaScript / Node APIs
-
RE: Does node.js not include packages in opkg yet?
@Boken-Lin I've placed it in a
hello
folder withinnode_modules
but if i require it like you said i get aModule/File not found
, i also placed apackage.json
in there but it wont work -
RE: Does node.js not include packages in opkg yet?
@Boken-Lin Nope i copied the entire folder containing the compiled hello world example and launched a repl in the folder that i posted above.
-
RE: Does node.js not include packages in opkg yet?
@Boken-Lin I have compiled my module for MIPS Arch but now i get a "File not found" Error from node if i want to require it.
root@Omega-XXXX:/mnt/sda1/test/build/Release# node` > var hello = require('./hello') Error: File not found at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at repl:1:13 at REPLServer.self.eval (repl.js:110:21) at repl.js:249:20 at REPLServer.self.eval (repl.js:122:7) at Interface.<anonymous> (repl.js:239:12) at Interface.EventEmitter.emit (events.js:95:17)
-
RE: Does node.js not include packages in opkg yet?
@Boken-Lin How Do I do this?
-
RE: Does node.js not include packages in opkg yet?
@Boken-Lin: Sure, i'd love to!
First my Specs:Asus Zenbook (ux32a)
Ubuntu 15.10 64bit (just a fresh install for the cross compiling, build-essential, gcc & etc preinstalled)Well i thought i can make a wrapper for "fast-gpio" using Windows 7 64bit but then i saw that it requires unix only headers.
Hmmm, ok, just for this i have made a clean install of ubuntu 15.10 on my laptop, installed node and npm and installed node-gyp.
I ported most of the code on my Windows PC and copied all to my laptop and compiled it with node-gyp.
Here my gyp file:{ 'targets': [ { 'target_name': 'gpio', 'sources': [ 'src/gpio.cpp' ], 'include_dirs': [ 'inc' ] } }
And a screen of the error:
Here is also the
readelf
log:> readelf -h gpio.node ELF-Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2er-Komplement, Little-Endian Version: 1 (current) OS/ABI: UNIX - System V ABI-Version: 0 Type: DYN (splitted Objektafile) Maschine: Advanced Micro Devices X86-64 Version: 0x1 Entry point address: 0xc30 Begin of Program-Header: 64 (Bytes in File) Begin of Sektions-header: 11376 (Bytes in File) Flags: 0x0 Size of Headers: 64 (Byte) Size of the Program-Header: 56 (Byte) Number of program headers: 7 Size of Sektions-Header: 64 (bytes) Count of Sektions-Header: 27 Sektions-Header Stringtabellen-Index: 24
Thats pretty much it.
Greetings from Germany! -
RE: Does node.js not include packages in opkg yet?
Is there any way to cross compile node addons for MIPS because if i compile it with Ubuntu 15.10 it says that my addon dont has a correct ELF Header.
Im pretty much done porting the fast-gpio lib to node.js but i have this error weile requiring it.