-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
2.10.0 breaks provider in nodejs #787
Comments
hmm, the mentioned code is coming from |
The problem is "crypto" isn't imported. |
I should note that I'm using the esm compiled code. I didn't check the cjs |
@tobowers: Did you find a solution for this? |
Right it's a bug and no, I just locked our version at 2.9.0
|
It looks like node18 only has the crypto global if the --experimental-global-webcrypto flag is used (https://nodejs.org/docs/latest-v18.x/api/globals.html#crypto_1). In 20 it's global by default. Need to check how to tell the bundler to add this import for backward compatibility 🤔 |
I think you can just |
Facing the same issue, pinned version to |
Description
The compiled code in 2.10.0 of the provider has these lines:
crypto
does not appear in the 2.9.0 package.crypto is not defined in the global scope so a simple `import {...} from "@hocuspocus/provider" errors with "ReferenceError: crypto is not defined"
Steps to reproduce the bug
Simply import 2.10.0 provider in a nodejs environment
Expected behavior
Continue to work :).
Environment?
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: