Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to import, seems to assume case-insensitive filesystem #1

Open
tv42 opened this issue Apr 21, 2023 · 0 comments
Open

fails to import, seems to assume case-insensitive filesystem #1

tv42 opened this issue Apr 21, 2023 · 0 comments

Comments

@tv42
Copy link

tv42 commented Apr 21, 2023

Trying to use this library with Node v19 on Linux leads to errors like:

Error: Module '"@almaju/result"' has no exported member 'Result'.

I noticed the index.js and index.d.ts files in dist/ refer to ./Result, but the files have lowercase names.

Kludging the installation with

mv -i node_modules/@almaju/result/lib/result.js  node_modules/@almaju/result/lib/Result.js
mv -i node_modules/@almaju/result/lib/result.d.ts  node_modules/@almaju/result/lib/Result.d.ts

makes it work.

I don't really understand how it got to this state, but it's unimportable on any case-sensitive filesystem, for example Linux. You should be able to see the issue easily with e.g. Docker Desktop / Podman Desktop, or a remote Linux server.

One way to fix this would be to use lowercase file names consistently, that seems to be the standard convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant