As i run this peice of code using node a.js:
var sys = require('sys'); sys.puts('Hello, World');
it gives an error
axconfig: port 1 not active axconfig: port 2 not active
I am new to using node..please help
As i run this peice of code using node a.js:
var sys = require('sys'); sys.puts('Hello, World');
it gives an error
axconfig: port 1 not active axconfig: port 2 not active
I am new to using node..please help
strange - did it compile cleanly? what version of nodejs are you using?
You didn't install node.js but the package node (that contains some other unrelated software) for your linux distro.
You can install node.js two ways: Using git or download the version file, I recommend git to keep up with the lastest version.
First you need git and a compiler, here is how you install them on debian/ubuntu (this depends on your package manager):
sudo apt-get install git-core build-essential
Then go to a folder where the "node" repository will be placed, something like ~/projects
or ~/src
is good enough, and do this:
git clone git://github.com/ry/node.git
Then enter the node directory, configure it and build it.
cd node && ./configure && make
Everything should go well. Before installing node you can optionally run the tests to check for any problems:
make test
You can finally install node, this allows you to run the node command anywhere in the system and the javascript libraries to be installed.
make install
...and we are done.
You can test those lines of code using node-repl (node's REPL, think "interactive interpreter"), just type node-repl
, quit with Ctrl+D.
I am facing the same problem, when I install node with make install it hangs up..
can any one let me knoe the reason