0
我試圖按照教程的Node Beginner Book不能說的Hello World在節點
我已經安裝了節點和MongoDB成功,當我這樣做node -v
它給了我v0.5.11-pre
但是當我保存文件說hello.js
以下在Home/node/
譜寫終端node hello.js
它給了我下面的錯誤
[email protected]:~/Downloads$ node hello.js
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^Error: Cannot find module '/home/ubuntu/Downloads/hello.js'
at Function._resolveFilename (module.js:334:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)
請幫我看看我在做什麼錯在這裏。我在虛擬機中使用Ubuntu。
檢查您的文件名。對我來說,似乎你試圖運行一些不存在的東西。 – Kirstein 2012-04-26 11:52:53
@Kirstein,應該是一個答案;) – 2012-04-26 11:55:18