express icon indicating copy to clipboard operation
express copied to clipboard

cannot find module 'connect/util'

Open mhayashi opened this issue 15 years ago • 10 comments

after updated connect to v0.5.8, express v1.0.3 cannot find 'connect/util' :(

mhayashi avatar Feb 05 '11 00:02 mhayashi

I too was having issues with this until I installed from source (github) and it worked.

Seems master is up to date.

ncb000gt avatar Feb 05 '11 01:02 ncb000gt

this is by design. use require('connect').utils etc instead, it's bad practice to use nested requires

tj avatar Feb 05 '11 02:02 tj

yeah, i know. but i think 1.x branch might need to be fixed.

https://github.com/visionmedia/express/blob/1.x/lib/express/request.js https://github.com/visionmedia/express/blob/1.x/lib/express/response.js

mhayashi avatar Feb 05 '11 02:02 mhayashi

I also am having issues after doing npm update

alfredwesterveld avatar Feb 05 '11 02:02 alfredwesterveld

@tj - That's fine that it is bad practice. The point is that the latest version (1.0.3) in npm uses the nested requires and crashes with errors.

I noticed you've fixed the issues in master. So, I'd recommend that anyone having this issue use the source from github.

ncb000gt avatar Feb 05 '11 03:02 ncb000gt

If you are using npm i'd recommend run this command: npm uninstall express npm uninstall connect npm install [email protected] npm install express

and wait for new version of express in npm

PS: maybe there is shorter command of npm for downgrade app, but I don't know :)

ghost avatar Feb 05 '11 12:02 ghost

after doing the above mentioned i still can't seem to make an express app

here's the output:

$ express app

/home/anup/.node_libraries/.npm/express/1.0.3/package/bin/express:355 if (err && err.errno !== process.ENOENT) throw err; ^ Error: ENOENT, No such file or directory

asyncanup avatar Feb 05 '11 13:02 asyncanup

Installed via NPM getting the same error. Can't even run the example app. Also latest github master doesn't compile.

jmwhittaker avatar Feb 05 '11 18:02 jmwhittaker

compile? express does not compile lol.. but I fixed the require()s in express and pushed out 1.0.4

tj avatar Feb 05 '11 19:02 tj

Ha yep I actually meant to say make! Not sure where compile came from! Grabing 1.0.4 now thanks.

jmwhittaker avatar Feb 05 '11 23:02 jmwhittaker