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

[preact/compat] [Next.js] Uncaught TypeError: (0 , l.use) is not a function #4374

Open
1 task
EliasVal opened this issue May 8, 2024 · 1 comment
Open
1 task
Labels

Comments

@EliasVal
Copy link

EliasVal commented May 8, 2024

  • Check if updating to the latest Preact version resolves the issue

Describe the bug
Next.js version: 14.3.0-canary.49 (latest canary at the time of writing)
Preact version: latest

next dev works fine, next build builds successfully but the following error is logged when entering the website:

Uncaught TypeError: (0 , l.use) is not a function
    at O.w [as constructor] (app-index.tsx:131:10)
    at O.B [as render] (preact.module.js:1:9068)
    at I (preact.module.js:1:6486)
    at T (preact.module.js:1:1877)
    at I (preact.module.js:1:6700)
    at T (preact.module.js:1:1877)
    at I (preact.module.js:1:6700)
    at T (preact.module.js:1:1877)
    at I (preact.module.js:1:6700)
    at T (preact.module.js:1:1877)

To Reproduce

  1. Build your Next.js app
  2. Open the website

Expected behavior
Website to open normally

@rschristian
Copy link
Member

rschristian commented May 8, 2024

NextJS is not supported with Preact, FYI.

We don't provide an implementation for use yet through compat, which looks like the issue.

Build your Next.js app

This is not a valid reproduction. Please follow the instructions we laid out in the bug template, it's there so we can help you better.

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

No branches or pull requests

2 participants