Facing problems about module 'ejs' when running the example "auth" of the source code.

249 views
Skip to first unread message

GUAN XI

unread,
Feb 23, 2011, 11:19:09 AM2/23/11
to Express

When I trying to run the example "auth" in the source code, I got the
error information as below.
Does anyone face the same problem before? Is there any package I
haven't installed which causes this error?

This is the command I used
"/express/examples/auth$ node app.js
Express started on port 3000"

Below is the error
"Error: Cannot find module 'ejs'
at Function._resolveFilename (module.js:290:11)
at Function._load (module.js:242:25)
at require (module.js:318:19)
at View.templateEngine (/home/guanxi/express/lib/view/view.js:
134:38)
at ServerResponse.render (/home/guanxi/express/lib/view.js:255:22)
at Object.<anonymous> (/home/guanxi/express/examples/auth/app.js:
101:7)
at param (/usr/local/lib/node/.npm/connect/0.5.10/package/lib/
connect/middleware/router.js:146:21)
at pass (/usr/local/lib/node/.npm/connect/0.5.10/package/lib/
connect/middleware/router.js:162:10)
at Object.router [as handle] (/usr/local/lib/node/.npm/connect/
0.5.10/package/lib/connect/middleware/router.js:168:6)
at next (/usr/local/lib/node/.npm/connect/0.5.10/package/lib/
connect/index.js:218:15)
"
I am using Ubuntu 10.10, my version of node.js is 4.0

Hongbo LU

unread,
Feb 23, 2011, 1:58:04 PM2/23/11
to Express
there is a folder : express/support, when you download express, the
support libs won't be downloaded, you have to download the needed
support libs manually.

https://github.com/visionmedia/express/tree/master/support

Laurie Harper

unread,
Feb 23, 2011, 2:28:17 PM2/23/11
to expre...@googlegroups.com
Or tell git to do it for you ('git --init-submodules' or something like that); or note the error message ("Error: Cannot find module 'ejs'") and manually install the missing dependancy with npm: npm install ejs

> --
> You received this message because you are subscribed to the Google Groups "Express" group.
> To post to this group, send email to expre...@googlegroups.com.
> To unsubscribe from this group, send email to express-js+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/express-js?hl=en.
>

--
Laurie Harper
http://laurie.holoweb.net/

GUAN XI

unread,
Feb 24, 2011, 7:06:10 AM2/24/11
to expre...@googlegroups.com
Thanks for the reply of Laurie Harper and Hongbo LU. I have fixed the problem by using the command "npm install ejs".
Thank you .

2011/2/23 Laurie Harper <lau...@holoweb.net>

vision media [ Tj Holowaychuk ]

unread,
Feb 25, 2011, 12:01:54 PM2/25/11
to expre...@googlegroups.com
support/* is for development and running the tests only
Tj Holowaychuk
Vision Media
President & Creative Lead
Reply all
Reply to author
Forward
0 new messages