question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Casing in NPM @clerk/backend-core is broken, breaking the package on Linux

See original GitHub issue

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:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
SokratisVidroscommented, Aug 5, 2022

This should be now fixed. Shall we close it?

0reactions
no2chemcommented, Aug 5, 2022

Yeah it can be closed. Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found