Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.

Express version 4 does not support function "configure" #9

Open
redhat-raptor opened this issue Dec 21, 2014 · 1 comment
Open

Express version 4 does not support function "configure" #9

redhat-raptor opened this issue Dec 21, 2014 · 1 comment

Comments

@redhat-raptor
Copy link

Getting this error:

app.configure(function() {
^
TypeError: Object function (req, res, next) {
app.handle(req, res, next);
} has no method 'configure'

This is because Express version 4 does not support "configure" function: http://stackoverflow.com/questions/22202232/express-has-no-method-configure-error

However package.json has hard-coded express dependency:
"express": "*"
which is causing express version 4 to download. Express version 3 works fine!

@krisdahl
Copy link

krisdahl commented Jan 3, 2015

To get it to work with Express 4, just change

app.configure(function() {
    app.use(express.static(__dirname + '/public'));
});

to be

app.use(express.static(__dirname + '/public'));

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

No branches or pull requests

2 participants