Skip to content

res.sendStatus is not a function #375

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

Closed
tanmays opened this issue May 26, 2016 · 4 comments
Closed

res.sendStatus is not a function #375

tanmays opened this issue May 26, 2016 · 4 comments

Comments

@tanmays
Copy link

tanmays commented May 26, 2016

Hello,

Curent setup:

parse-server v2.2.10
parse-dashboard v1.0.11
Both as express middleware on same server (AWS EB)

Configuration:

var ParseDashboard = require('parse-dashboard');
var dashboard = new ParseDashboard({
  "apps": [
    {
      "serverURL": "http://xxx.com/parse",
      "appId": "xxx",
      "masterKey": "xxx",
      "appName": "xxx"
    }
  ],
  "users": [
    {
      "user":"xxx",
      "pass":"xxx"
    }
  ]
});

// make the Parse Dashboard available at /dashboard
app.use('/dashboard', dashboard);

Error log:

TypeError: res.sendStatus is not a function
    at /var/app/current/node_modules/parse-dashboard/Parse-Dashboard/app.js:123:18
    at Layer.handle [as handle_request] (/var/app/current/node_modules/parse-dashboard/node_modules/express/lib/router/layer.js:95:5)
    at next (/var/app/current/node_modules/parse-dashboard/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/var/app/current/node_modules/parse-dashboard/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/var/app/current/node_modules/parse-dashboard/node_modules/express/lib/router/layer.js:95:5)
    at /var/app/current/node_modules/parse-dashboard/node_modules/express/lib/router/index.js:277:22
    at Function.process_params (/var/app/current/node_modules/parse-dashboard/node_modules/express/lib/router/index.js:330:12)
    at next (/var/app/current/node_modules/parse-dashboard/node_modules/express/lib/router/index.js:271:10)
    at SendStream.error (/var/app/current/node_modules/parse-dashboard/node_modules/express/node_modules/serve-static/index.js:120:7)
    at emitOne (events.js:77:13)
@drew-gross
Copy link
Contributor

We probably need to bump our express version. If you delete node_modules and reinstall, does that fix the issue?

@drew-gross
Copy link
Contributor

Hmm never mind, we already have the most recent version in package.json.

@tanmays
Copy link
Author

tanmays commented May 26, 2016

@drew-gross that was it! My express version was old. Updating it fixed the issue. Thanks much!

@jgaull
Copy link

jgaull commented Nov 2, 2016

Thanks @tanmays! Your solution worked for me too.

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