0

我的机器(mac)上安装了节点、mongodb 和 redis,并尝试 使用以下说明测试此应用程序https://github.com/vinkaga/node-backbone

Install and run MongoDB
Install and run Redis.io
Edit config.js if you are running MongoDB or Redis.io from another machine or non-default port
Start server by typing "node server.js"

以前从未使用过 node 或 express 并且天真地假设运行node server.js就足以让一切开始,我做到了,但它说

![Error: Cannot find module 'express'][1]

这是应用程序的目录

目录

这是 package.json 文件。我还需要做些什么才能让它在本地机器上运行吗?

{
    "name":"YOUR-PROJECT-NAME",
    "description":"YOUR PROJECT DESCRIPTION",
    "author":"YOUR NAME <your@emailaddress.com>",
    "version":"0.0.1",
    "dependencies":{
        "connect":">=2.1.2",
        "express":"2.x.x",
        "connect-redis" : ">=1.3.0",
        "jade":">=0.24.0",
        "ejs" : ">=0.7.1",
        "mongoose":">=2.5.14",
        "socket.io":">=0.9.5",
        "connect-assetmanager":">=0.0.27",
        "connect-assetmanager-handlers" : ">=0.0.18"
    },
    "devDependencies":{
        "vows":">=0.6.2",
        "mocha":">=1.0.1",
        "should":">=0.6.1",
        "request":">=2.9.x",
        "soda":">=0.2.5"
    },
    "engine":"node >= 0.6.12"
}
4

1 回答 1

4

从您的项目目录运行此命令

$ npm 安装

于 2012-10-02T00:24:18.083 回答