Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start new project with Vash #3

Open
paranoid-android opened this issue Sep 4, 2015 · 3 comments
Open

Unable to start new project with Vash #3

paranoid-android opened this issue Sep 4, 2015 · 3 comments

Comments

@paranoid-android
Copy link

Hello,

I'm attempted to start a new Node.js app using Vash. I following this example. I copied the contents of app.js. My package.json is slightly different. Mine looks like this:

{
  "name": "MyApp",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "body-parser": "^1.13.3",
    "cookie-parser": "^1.3.5",
    "debug": "^2.2.0",
    "errorhandler": "^1.4.2",
    "express": "^4.13.3",
    "express-session": "^1.11.3",
    "method-override": "^2.3.5",
    "morgan": "^1.6.1",
    "multer": "^1.0.3",
    "serve-favicon": "^2.3.0",
    "vash": "^0.9.3"
  },
  "scripts": {
    "start": "node app"
  }
}

After running npm install, I run node app.js. At that point, I get an error:

/Users/username/Website/node_modules/express/lib/application.js:209
    throw new TypeError('app.use() requires middleware functions');
          ^
TypeError: app.use() requires middleware functions
    at EventEmitter.use (/Users/username/Website/node_modules/express/lib/application.js:209:11)
    at Object.<anonymous> (/Users/username/Website/app.js:31:5)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

I do not understand why I am getting this error. I also do not understand how to fix it. How do I fix this error?

Thank you!

@kirbysayshi
Copy link
Owner

Did you clone this project, or copy the code from app.js? There are more files than just app.js required, such as the routes and views. I just tried cloning this repo, and then npm install, and it started up successfully.

@mrmartineau
Copy link

I just cloned this repo and am experiencing the same issues.. I am going to try to debug it and figure out the issue.

@mrmartineau
Copy link

It looks like multer (line 35) was causing the issue. I have disabled it and the app now works. I don't need it at this point so I am not going to find a fix just yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants