Closed aladdin-add closed 5 years ago
Did you create ./test.js
first?
yes, I did. here is a repro: https://github.com/Aladdin-ADD/eslump-issue7
Thanks. First, you need the ./
since it is a local file and not a package in node_modules
. But even with eslump ./cherow.js output
I got the error. I have almost exclusively run the CLI directly in the eslump repo so I haven’t noticed :) I think the issue is that the CLI tries to require("./cherow.js")
relative to itself, not relative to CWD.
For now, you can clone this repo and run the bundled cherow example. It might be a bit outdated, though.
Fixed in v2.0.0
it reports
Cannot find module './test.js'
-- since./test.js
is a file, not a package.I can make a repo to reproduce later(if needed).
background: I was trying to use it in cherow.