satyr/coco

Modules as directories with index.co don't seem to work

ksdlck opened this issue · 4 comments

echo 'require \l' > t.co
mkdir l
echo 'exports.l = \l' > l/index.co
coco t.co
Failed at: t.co
Error: Cannot find module 'l'

I think coco doesn't register its extension so you need to compile it. I totally could be wrong.(and I do think so)

Try: require \./l

Works. Unfortunately this is what I had in the larger bit of code that is not working, and what was omitted in the testcase above. Better that the issue is not this in any case.

Very strange behavior here; the impetus for opening this issue was that manually compiling an index.js from the index.co in the directory-module in question solved the issue, though now removing it things still work as expected. I believe this may be an unrelated Makefile issue.