Getting error while running simple javascript using node framework

前端 未结 8 2025
闹比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:54

    This problem is occur in ubuntu,so I resolved this problem by git. Clone this new source from github and do following actions:

    1. Uninstall node

      sudo apt-get remove --pure node
      sudo apt-get clean

    2. Make install node

      git clone https://github.com/joyent/node.git
      cd node
      ./configure
      make
      make install

    Then this will be work well.

提交回复
热议问题