On Fri, May 11, 2012 at 8:30 PM, kowsik <[email protected]> wrote:
> npm version is 1.1.21. Did an 'npm install hamljs' and
> require('hamljs') gives me this:
>
> Error: Cannot find module 'hamljs'
>   at Function._resolveFilename (module.js:332:11)
>   at Function._load (module.js:279:25)
>   at Module.require (module.js:354:17)
>   at require (module.js:370:17)
>   at repl:1:2
>   at REPLServer.eval (repl.js:80:21)
>   at Interface.<anonymous> (repl.js:182:12)
>   at Interface.emit (events.js:67:17)
>   at Interface._onLine (readline.js:162:10)
>   at Interface._line (readline.js:426:8)
>
> Any ideas? I see a bunch of pull requests in various states but
> nothing that points to me in the right direction.

When I install it, I see this on the console:

npm WARN excluding symbolic link index.js -> lib/haml.js

After manually recreating index.js as a symlink, it works.
Alternatively, requiring the target of the symlink also works, as in:

var haml = require('hamljs/lib/haml.js');

--
Martin Cooper


> Thanks,
>
> K.
> ---
> http://blitz.io
> @k0ws1k
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to