0

これらの手順に従って、Ubuntuにnode.jsをインストールしています( http://nodenode.com/post/1197688151/installing-node-js-on-ubuntu-screencast-tutorial

そして私は最後のステップで次のエラーを受け取ります

私はタイプするnode hello_node.js

私の端末は返信します

/home/joe/tmp/hello_node/hello_node.js:1
require(‘http’);
    ^

 node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick
          ^
 SyntaxError: Unexpected token ILLEGAL
     at Module._compile (module.js:427:25)
      at Object..js (module.js:450:10)
  at Module.load (module.js:351:31)
  at Function._load (module.js:310:12)
  at Array.0 (module.js:470:10)
  at EventEmitter._tickCallback (node.js:192:40)

だから、私は「httpが必要」のようです。私は何か間違ったことをしていますか...さらに悪いことに、愚かですか?

4

1 に答える 1

3

通常の一重引用符は使用していません。あなたが持っている:

require(‘http’);

そのはず:

require('http');
于 2012-05-16T20:42:10.077 に答える