5

I've just installed Yeti from Yahoo, but when I go to http://localhost:8000/ I get this:

Error: Cannot find module 'jade'
at loadModule (node.js:289:15)
at require (node.js:420:14)
at ServerResponse.render (/usr/local/lib/node/.npm/yeti/0.1.0/dependencies/express/view.js:258:46)
at Object.<anonymous> (/usr/local/lib/node/.npm/yeti/0.1.0/package/lib/server.js:28:13)
at pass (/usr/local/lib/node/.npm/yeti/0.1.0/dependencies/connect/middleware/router.js:67:31)
at /usr/local/lib/node/.npm/yeti/0.1.0/dependencies/connect/middleware/router.js:80:14
at EventEmitter._tickCallback (node.js:50:25)
at node.js:773:9

I also want to mention that i have installed this using the installer package from Yahoo! http://yuilibrary.com/downloads/download.php?file=3716057163a82b4b00c2a00ab0bb186e

Is there a fix for this?

Uffo
  • 9,628
  • 24
  • 90
  • 154

3 Answers3

20

I had this problem using the "Express" framework and I solved it by typing npm install -d in directory where my app was created.

ryantm
  • 8,217
  • 6
  • 45
  • 57
  • 2
    What does this flag actually do? – Shane Chin Aug 19 '12 at 00:46
  • @ShaneChin: Errr... It's nothing more than a verbose output flag? See `npm help config` or [these docs](https://npmjs.org/doc/config.html) for reference. The net effect is nothing more than installing all of `package.json`'s specified modules into `node_modules` in your local directory. – Christopher Dec 19 '12 at 04:32
4

I haven't installed yeti, but by looking at the node stack trace, it looks like the maintainer left out the jade module.

From the console try:

/usr/local/bin/npm install jade

or

sudo /usr/local/bin/npm install jade

depending on your permissions.

Repeat for any other missing modules. If you're still stuck, I can download it and check it out.

om-nom-nom
  • 62,329
  • 13
  • 183
  • 228
bxjx
  • 1,838
  • 17
  • 11
  • Maybe the installer didn't install the npm binary. Maybe see if you can find it. Does 'type npm' return anything? Is there any file called npm in the /usr/local directory? 'find /usr/local -name npm' – bxjx Sep 09 '10 at 03:08
  • Maybe binary is installed to `/usr/bin/npm`, if npm is installed via `curl http://npmjs.org/install.sh | sh`. Somehow I have the very same error with `jade` and I've done `sudo /usr/bin/npm install jade`. – shaman.sir Mar 15 '11 at 10:53
2

I solved this problem with:

ln -s /usr/lib/node ~/.node_modules

So the full npm install process for me was:

curl http://npmjs.org/install.sh | sudo sh
ln -s /usr/lib/node ~/.node_modules
sudo npm install jade
node ./build.js

(do not use sudo if not required)

shaman.sir
  • 3,198
  • 3
  • 28
  • 36