Skip to content
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

bug: ReferenceError: crypto is not defined in generators.js #6117

Open
4 tasks
arjun-iihglobal opened this issue Jun 27, 2024 · 5 comments
Open
4 tasks

bug: ReferenceError: crypto is not defined in generators.js #6117

arjun-iihglobal opened this issue Jun 27, 2024 · 5 comments
Labels
bug Something isn't working pending-verification Something is still under investigation

Comments

@arjun-iihglobal
Copy link

Describe the bug

I am getting a ReferenceError: crypto is not defined. The file reference is @logto/node/lib/edge/generators.

And I am using Node js v18.20.3

Expected behavior

Just import the crypto in @logto/node/lib/edge/generators

How to reproduce?

Just install the @logto/express with node 18 version
and use import { handleAuthRoutes } from "@logto/express";

Context

  • Logto Cloud
  • Self-hosted, Logto version =
    • Container (Docker image)
    • Raw Node.js

Screenshots

image

image

@arjun-iihglobal arjun-iihglobal added the bug Something isn't working label Jun 27, 2024
@darcyYe
Copy link
Contributor

darcyYe commented Jun 27, 2024

Would you like to double check whether your @logto/express SDK is updated? Seems I can not find import crypto from 'crypto'; in our latest @logto/node/edge/generators.ts file.

@darcyYe darcyYe added the pending-verification Something is still under investigation label Jun 27, 2024
@arjun-iihglobal
Copy link
Author

image

Yes I am using latest @logto/express npm package

and you can see there is no import of crypto
image

@charIeszhao
Copy link
Member

The crypto API are available on node 20, I'm afraid.

@arjun-iihglobal
Copy link
Author

Yes, It is working on node 20. I have tested this.

@vacijj
Copy link

vacijj commented Sep 23, 2024

See also logto-io/js#784 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending-verification Something is still under investigation
Development

No branches or pull requests

4 participants