Other Projects

[CB for BP] Node.js set up develop environment

3 5937
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

And I find this interesting project NodeOS(
, though still work in progess). So let's set up the Node.js develop environmet on BP first. This is a little different from on PC.

In root, or you can use sudo. If you don't set the root, follow:
  1. #sudo passwd  
  2. Password:<---------the password you use now
  3. Enter new UNIX password:<------the new root password
  4. Retype new UNIX password:<------retype it
Copy the Code
type su enter the root mode, download the package
  1. root@cubieboard2:/# cd /home/linaro/Downloads/
  2. root@cubieboard2:/home/linaro/Downloads# wget http://www.nodejs.org/dist/v0.10.15/node-v0.10.28.tar.gz
Copy the Code
you can go
to check the newest node.js

After download the package,

  1. #tar -xzvf node-v0.10.28.tar.gz
  2. #cd node-v0.10.28
  3. #./configure --without-snapshot
Copy the Code
This part is important.

after see 'v8_use_snapshot': 'false', we can move on:
  1. #make
Copy the Code
. Now you can AFK, for a movie. It takes a long time.
  1. #make install
Copy the Code
Almost Done!
To check whether install successfully:
  1. #node -v
Copy the Code
NodeJS hello bp.jpg

Enjoy Node.js

thanks for this

i got an error when running make.

Do you know what might be the matter??
  1. Traceback (most recent call last):
  2.   File "../../tools/js2c.py", line 578, in <module>
  3.     main()
  4.   File "../../tools/js2c.py", line 574, in main
  5.     JS2C(args[3:], args[0], args[1], args[2], options.raw, options.startup_blob)
  6.   File "../../tools/js2c.py", line 542, in JS2C
  7.     sources = PrepareSources(source)
  8.   File "../../tools/js2c.py", line 394, in PrepareSources
  9.     assert len(macro_files) in [0, 1]
  10. TypeError: object of type 'filter' has no len()
  11. deps/v8/tools/gyp/js2c.target.mk:13: recipe for target '/home/bananapi/test/node-v0.12.7/out/Release/obj/gen/libraries.cc' failed
  12. make[1]: *** [/home/bananapi/test/node-v0.12.7/out/Release/obj/gen/libraries.cc] Error 1
  13. make[1]: Leaving directory '/home/bananapi/test/node-v0.12.7/out'
  14. Makefile:45: recipe for target 'node' failed
  15. make: *** [node] Error 2
Copy the Code
i have an B-Pro with archlinux.

You have to log in before you can reply Login | Sign Up

Points Rules