Closed xoxys closed 1 year ago
I have to correct myself, it's not an alpine specific issue it also doesn't work on library/node:lts-slim
? Any idea what's wrong?
Thank you for the issue!
https://nodejs.org/api/modules.html#accessing-the-main-module
When the entry point is not a CommonJS module, require.main is undefined, and the main module is out of reach.
So I'm guessing this is related to index.js
no longer being a CommonJS module. It's a bit strange that I didn't see this issue when I ran the tool on Windows, though.
In any case, this is potentially an issue with the app-root-path
NPM module. I'll try to come up with a minimal repro case for them.
OK I can reproduce this. I notice that this bug only occurs when I install Spellchecker CLI globally in the container. If I install it in an NPM package (after running npm init
), I don't see the error.
Not sure if the upstream issue will ever get solved after the last commit is 3 years old.
Yes, that's true. The app-root-path readme does say "expect long stretches of zero updates". Still, that repo has a number of unaddressed issues and PRs.
I'll probably change spellchecker-cli to not depend on app-root-path anymore.
This should be fully fixed in 6.0.1.
Awesome! Thanks for the fix.
Hi,
spellchecker-cli
v5 doesn't work anymore on alibrary/node:lts-alpine
container: