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

Error in examples, "Each layer must have a route and a handle function" #361

Closed
na opened this issue Jul 21, 2010 · 7 comments
Closed

Error in examples, "Each layer must have a route and a handle function" #361

na opened this issue Jul 21, 2010 · 7 comments

Comments

@na
Copy link

na commented Jul 21, 2010

When I try to run the examples i get:

/home/nateanderson/.node_libraries/connect/index.js:146
        throw new Error("Each layer must have a route and a handle function");
              ^
Error: Each layer must have a route and a handle function
    at Server.use (/home/nateanderson/.node_libraries/connect/index.js:146:15)
    at new Server (/home/nateanderson/src/express/lib/express/server.js:34:10)
    at Object.createServer (/home/nateanderson/src/express/lib/express/index.js:29:12)
    at Object.<anonymous> (/home/nateanderson/src/express/examples/jade/app.js:20:19)
    at Module._compile (module:427:23)
    at Module._loadScriptSync (module:437:8)
    at Module.loadSync (module:310:10)
    at Object.runMain (module:491:22)
    at node.js:253:10
@tj
Copy link
Member

tj commented Jul 21, 2010

Need connect HEAD at the moment sorry

@muellerkyle
Copy link

I'm also receiving this issue.

app.use is now requiring a string and a function.

Additionally, I've tried Cloning Express and submodules again.. and 'make install-support' fails with:

make: *** No rule to make target `install-support'. Stop.

@na
Copy link
Author

na commented Jul 21, 2010

I pulled down latest connect and installed and still get the error. How do I make sure it is using the right connect. I have also installed connect using npm so I'm not sure if there is a conflict there.

@na
Copy link
Author

na commented Jul 21, 2010

ok deleted all traces of connect and reinstalled and now it works.

@tj
Copy link
Member

tj commented Jul 21, 2010

my bad, reverted the commit that removed make install-support. we should release another connect soon so this stuff stops

@muellerkyle
Copy link

It appears that this may be an old version of node causing the error.

I pulled the latest on the node git repo and make installed, then express, then connect and the problem has cleared.

@tj
Copy link
Member

tj commented Jul 21, 2010

k cool! closing :)

This issue was closed.
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