preact icon indicating copy to clipboard operation
preact copied to clipboard

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

Open EliasVal opened this issue 9 months ago • 3 comments

  • [ ] 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

EliasVal avatar May 08 '24 12:05 EliasVal