perry-mitchell / ulidx

ULID generator for NodeJS and the browser
MIT License
281 stars 17 forks source link

Issue with vercel edge functions: unsupported module layerr #34

Open nkuehn opened 1 year ago

nkuehn commented 1 year ago

Hi, thank you very much for providing a better maintained version of ULID!

I was successfully using it in the local vercel dev mode but the build fails on vercel when pushing.

"Error: The Edge Function "foo" is referencing unsupported modules: - ulidx: layerr ("foo" replaced my function path)

vercel is recommending nanoid but it would be a pity if that's the only option (which is not sortable)

https://vercel.com/guides/library-sdk-compatible-with-vercel-edge-runtime-and-functions

perry-mitchell commented 1 year ago

I'd need to check what's failing, but if you have any ideas I'd like to hear them. I maintain layerr as well, if it's something in that library I can address it. I'm not aware of any native libraries being used there, however..

nkuehn commented 1 year ago

I'm sorry but I really have no idea what it could be. From the logs it looks like some custom check vercel does - at least I cannot reconcile seeing the kind of error in other contexts.

perry-mitchell commented 1 year ago

I don’t use Vercel personally so I wouldn’t have a way to confirm any fix. If you come up with an idea what could be wrong I’ll happy try to address it, but don’t have the time to go digging myself right now.

arjunyel commented 5 months ago

Are you using CJS? https://arethetypeswrong.github.io/?p=layerr%403.0.0