简体   繁体   English

运行node.js程序时出错

[英]error while running node.js program

I am trying to implement this program on my window system but i am getting this error . 我正在尝试在我的窗户系统上实现程序,但出现此错误。

Administrator@rahul ~/nodepad
$ node app.js
native library not built
Express server listening on port 3000, environment: development
Using connect 0.5.9, Express 1.0.7, Jade 0.6.3

node.js:50
    throw e; // process.nextTick error, or 'error' event on first tick
    ^
Error: EPERM, Operation not permitted
    at Stream._onConnect (net.js:687:18)
    at IOWatcher.onWritable [as callback] (net.js:284:12)

Please suggest why this errror is coming . 请说明为什么会出现这种错误。

Thanks 谢谢

If you meant to say "my Windows system" and you have built a WIN32 version of node, then it is likely that the permissions related code has not yet been implemented. 如果您要说“我的Windows系统”,并且已经建立了节点的WIN32版本,则可能尚未实现与权限相关的代码。

I suggest that you try the Cygwin version. 我建议您尝试Cygwin版本。 I have sucessfully built 0.5.0pre on Cygwin. 我已经在Cygwin上成功构建了0.5.0pre。 If you don't have Cygwin, it is easy to install on XP or Win7. 如果您没有Cygwin,则可以轻松地在XP或Win7上安装。 You don't need all of it, just the base install and the packages mentioned here: https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) 您不需要所有这些,只需这里介绍的基本安装和软件包即可: https : //github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows)

Have you started a mongodb instance? 您是否启动了mongodb实例? Nodepad app requires a MongoDB database to work. Nodepad应用程序需要MongoDB数据库才能工作。

Get a precompiled package from http://www.mongodb.org , unzip and create a "data" directory. http://www.mongodb.org获取预编译的程序包,解压缩并创建“数据”目录。 then run "mongod --dbpath ./data" from the bin dir (use your 'data' path). 然后从bin目录运行“ mongod --dbpath ./data”(使用您的“数据”路径)。

Sometimes Node.js stacktraces are cryptic. 有时,Node.js堆栈跟踪是神秘的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM