Modules as directories with index.co don't seem to work
ksdlck opened this issue · 4 comments
ksdlck commented
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'
vendethiel commented
I think coco doesn't register its extension so you need to compile it. I totally could be wrong.(and I do think so)
satyr commented
Try: require \./l
ksdlck commented
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.
ksdlck commented
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.