defer-run / defer.client

Zero infrastructure Node.js background jobs

Home Page:https://www.defer.run/docs/introduction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remix - No matching export for import "randomUUID"

piotrkulpinski opened this issue · comments

Hi, I've run into trouble while trying to set up hello world example as a background job in Remix.

Whenever I try to run the server, it crashes with the following error:

No matching export in "../../node_modules/esbuild-plugin-polyfill-node/polyfills/empty.js" for import "randomUUID"
dev: 
dev:     ../../node_modules/@defer/client/esm/index.js:2:9:
dev:       2 │ import { randomUUID } from "crypto";

Any idea why?
Thanks!

Hi @piotrkulpinski,

Thanks for reporting this problem!
It seems to be an issue related to Remix bundler: remix-run/remix#6284

We'll watch the improvements closely on their side 👀

I've released the 1.5.0-alpha-20230615080921-44b91f9 canary version, which no longer relies on the native crypto NodeJS module. Can you confirm that it fixes the issue on your side?

Yup, 1.5.0 fixed the issue for me.

Thank you, @piotrkulpinski, for your feedback. I will conduct further tests to ensure that there are no issues. Once the testing is complete, I will release this version as stable.