English 中文(简体)
现在js 现在不工作
原标题:nowjs not working

I successfully installed nowjs on my server. Now I m trying this tutorial: http://nowjs.com/doc/example I created both files and put them into var/www/test By running this command

node helloworld_server.js

我有一个错误:

module.js:337
    throw new Error("Cannot find module  " + request + " ");
          ^
Error: Cannot find module  now 
    at Function._resolveFilename (module.js:337:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at Object.<anonymous> (/var/www/helloworld_server.js:7:13)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)
    at Function._load (module.js:311:12)
    at Array.0 (module.js:484:10)

The installation worked fine and node is correctly installed. I m a beginner in administrating a server, but whats wrong with the code? Thanks!

最佳回答

这是一个非常通用的错误, 告诉您 Node. js 找不到模块。 如果您在项目根部安装了 npm 模块, 您应该有一个节点_ 模块目录。 在目录中, 您应该能看到您安装的模块 。

问题回答

暂无回答




相关问题
How to make Sequelize use singular table names

I have an model called User but Sequelize looks for the table USERS whenever I am trying to save in the DB. Does anyone know how to set Sequelize to use singular table names? Thanks.

What is Node.js? [closed]

I don t fully get what Node.js is all about. Maybe it s because I am mainly a web based business application developer. What is it and what is the use of it? My understanding so far is that: The ...

Clientside going serverside with node.js

I`ve been looking for a serverside language for some time, and python got my attention somewhat. But as I already know and love javascript, I now want learn to code on the server with js and node.js. ...

Can I use jQuery with Node.js?

Is it possible to use jQuery selectors/DOM manipulation on the server-side using Node.js?

How do I escape a string for a shell command in node?

In nodejs, the only way to execute external commands is via sys.exec(cmd). I d like to call an external command and give it data via stdin. In nodejs there does yet not appear to be a way to open a ...

热门标签