Casing in NPM @clerk/backend-core is broken, breaking the package on Linux
See original GitHub issue- Review the documentation: https://docs.clerk.dev/
- Search for existing issues: https://github.com/clerkinc/javascript/issues
- Go through package changelog files.
- [N/A] Provide the Frontend API key from your application dashboard.
Package + Version
-
@clerk/clerk-js
-
@clerk/clerk-react
-
@clerk/nextjs
-
@clerk/remix
-
@clerk/clerk-expo
-
@clerk/backend-core
-
@clerk/clerk-sdk-node
-
@clerk/edge
- other:
Version:
1.14.1
Description
It would appear that backend-core contains an incorrectly cased import. This completely breaks anything that depends on it on any case-sensitive file system.
When using clerk-sdk-node on Linux, for example, the error:
Error: Cannot find module './ClerkBackendApi'
Is returned. Digging into this further, it seems that the file is named “ClerkBackendAPI.js” in the npm tarball:
tar xvzf backend-core-1.14.1.tgz
...
x package/dist/cjs/api/ClerkBackendAPI.js
x package/dist/mjs/api/ClerkBackendAPI.js
x package/dist/cjs/api/ClerkBackendAPI.d.ts
x package/dist/mjs/api/ClerkBackendAPI.d.ts
...
Now, macos and Windows have default case insensitive filesystems, so the package works fine, which makes this a real surprise when your application suddenly stops working after moving it into a Docker container.
Running the build locally, it seems all the files are properly named:
npm notice 1.7kB dist/cjs/api/ClerkBackendApi.d.ts
npm notice 1.5kB dist/cjs/api/ClerkBackendApi.d.ts.map
npm notice 4.6kB dist/cjs/api/ClerkBackendApi.js
So I’m not quite sure how they got renamed like that in the NPM tarball.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Common errors | npm Docs
Broken npm installation ... If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have...
Read more >How to Reinstall Broken npm - node.js - Stack Overflow
Show activity on this post. Try this command to reinstall npm npm install -g npm-reinstall. If you are using a linux distribution add...
Read more >Dev corrupts NPM libs 'colors' and 'faker' breaking thousands ...
Some surmised if the NPM libraries had been compromised, but it turns out there's much more to the story. The developer of these...
Read more >How To Reinstall NPM And Node.js On Any System
js running on your Windows environment is broken, you can reinstall and get the most out of them. You can use any of...
Read more >How one developer just broke Node, Babel and thousands of ...
A couple of hours ago, Azer Koçulu unpublished more than 250 of his modules from NPM, which is a popular package manager used...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be now fixed. Shall we close it?
Yeah it can be closed. Thanks!