-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
crypto.randomUUID is not a function #8820
Comments
Additional note: The same code will not have this problem if it is run through |
Note that
|
@awerlang It is indeed available in the context of Related screenshots: |
No idea why it behaves that way. I think you have three options:
|
If |
|
In my project, the use scenario of
crypto
is not directly introduced through the import syntax. In some places, I directly use thewindow.crypto.randomUUID
method. This method can work as expected in theChrome console
. After theparceljs build
, it cannot work as expected. I guess this may be related toNode Emulation
. Can I configure it through@parcel/transformer-js
inpackage.json
? I can't find relevant documents.Error screenshot:
The text was updated successfully, but these errors were encountered: