Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

express stop working - util is not defined

Had myself a little node/express app up and running. I haven't looked it for a out 3 months - now when I try to start the app I get the following error.

Express server listening on port 3000 in development mode
 Caught exception: ReferenceError: util is not defined

Anyone have any idea what spanner could have gotten into the works? Any help much appreciated.

Express is at "version": "2.5.0

like image 842
Chin Avatar asked Mar 20 '12 14:03

Chin


1 Answers

You need to require util:

var util = require('util');

Maybe that happened in your Mongo code somewhere.

like image 192
Jason Prawn Avatar answered Oct 16 '22 13:10

Jason Prawn