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

ReferenceError: nodeCrypto is not defined #397

Open
AuroraLantean opened this issue Dec 22, 2024 · 0 comments
Open

ReferenceError: nodeCrypto is not defined #397

AuroraLantean opened this issue Dec 22, 2024 · 0 comments

Comments

@AuroraLantean
Copy link

AuroraLantean commented Dec 22, 2024

Describe the bug
NextJs UI crashes after adding Stacks-Connect component

To Reproduce
Steps to reproduce the behavior:

  1. Clone my repo: git clone https://github.com/AuroraLantean/nextjs-shadcn-demo2
  2. Install packages: pnpm install
  3. Run NextJs: pnpm run dev
  4. See error: command line shows no error and it works for half a second. Then UI crashes with error: ReferenceError: nodeCrypto is not defined

Expected behavior
NextJs UI should not crash

Screenshots
Image

Desktop (please complete the following information):

  • OS: Linux Mint 22 Wilma based on Ubuntu 24.04 noble
  • Browser: Google Chrome, Version 131.0.6778.204 (Official Build) (64-bit)

Additional context
I tried https://github.com/hirosystems/stacks.js-starters with the latest NextJs 15.1.2 and React 19.0.0 and React Compiler. It works.

The biggest difference is that the stacks.js-starters repo uses Connect comopnent from @stacks/connect-react to wrap around the <ConnectWallet />. but do I have to use that wrapper? Is there something missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant