Getting error while running simple javascript using node framework

前端 未结 8 1984
闹比i
闹比i 2021-01-30 06:25

As I run this piece of code using node a.js:

var sys = require(\'sys\');
sys.puts(\'Hello, World\');

I\'m getting the following as a

8条回答
  •  清酒与你
    2021-01-30 06:56

    axconfig: port 1 not active axconfig: port 2 not active

    this problem no where related to nodejs.

    Do not install node using the command sudo apt-get install node, This will install radio package(node). this radio package requires axports to be active, which is not linked with nodejs

    So uninstall node from sudo apt-get remove node

    Manually Download nodejs from Here or from GitHub but make sure you install the stable branch(0.4.x).Unpack the nodejs.

    For installing please follow the README.md

    After installing then set the environment variables echo PATH=$PATH:/home/user/pathtonode/

提交回复
热议问题