sstephenson/eco

require/path problem with npm 0.2.18?

sschuster opened this issue · 1 comments

I know there's a lot of change going on at the moment (npm 0.2.18, node 0.4.0), but there seems to be an installation or path problem when installing eco with npm 0.2.18 (using node 0.4.0). While it worked fine with npm 0.2.16 it gives the following error when requiring after installed with the current npm:

Error: Cannot find module 'eco/compiler'
at Function._resolveFilename (module.js:289:11)
at Function._load (module.js:241:25)
at require (module.js:317:19)
at Object. (/Users/sschuster/.node_libraries/.npm/eco/1.0.1/package/lib/eco.js:2:18)
at Module._compile (module.js:373:26)
at Object..js (module.js:379:10)
at Module.load (module.js:305:31)
at Function._load (module.js:271:10)
at require (module.js:317:19)
at Object. (/Users/sschuster/.node_libraries/eco@1.0.1/index.js:11:18)

Also the contents of .node-modules/eco is different (eco.js, index.js, package.json.js and an eco folder with *.coffee.js files), while with the old npm it's just a bunch of *.js files.
I'm pretty new to the whole node/npm thing and don't fully understand the path/require things, but as I understood with node >= 0.3 coffee files can be included directly so maybe it's some npm change in this regard. Maybe you can have a look at this.

Fixed in Eco 1.0.2 and HEAD. Thanks for the report.