Giter VIP home page Giter VIP logo

Comments (7)

leerob avatar leerob commented on May 18, 2024

Is your code identical to the working examples here?

from next-learn.

mwoodpatrick avatar mwoodpatrick commented on May 18, 2024

I had added more modules but recreating package-lock.json and node_modules fixed my problem and I was able to deploy to Vercel

from next-learn.

bayram00 avatar bayram00 commented on May 18, 2024

i have a problem like this too

error - Error [TypeError]: Class extends value undefined is not a constructor or null
at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/file.js (evalmachine.:5724:19)
at __require (evalmachine.:14:50)
at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/formdata.js (evalmachine.:5881:49)
at __require (evalmachine.:14:50)
at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/body.js (evalmachine.:6094:35)
at __require (evalmachine.:14:50)
at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/response.js (evalmachine.:6510:49)
at __require (evalmachine.:14:50)
at (evalmachine.:11635:30)
at requireFn (file://C:\Users\Bayram\Desktop\nextapi\node_modules\next\dist\compiled\edge-runtime\index.js:1:7079) {
middleware: true

from next-learn.

fernandolucchesi avatar fernandolucchesi commented on May 18, 2024

i have a problem like this too

error - Error [TypeError]: Class extends value undefined is not a constructor or null at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/file.js (evalmachine.:5724:19) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/formdata.js (evalmachine.:5881:49) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/body.js (evalmachine.:6094:35) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/response.js (evalmachine.:6510:49) at __require (evalmachine.:14:50) at (evalmachine.:11635:30) at requireFn (file://C:\Users\Bayram\Desktop\nextapi\node_modules\next\dist\compiled\edge-runtime\index.js:1:7079) { middleware: true

same, happening after upgraded to next 13

from next-learn.

fernandolucchesi avatar fernandolucchesi commented on May 18, 2024

i have a problem like this too

error - Error [TypeError]: Class extends value undefined is not a constructor or null at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/file.js (evalmachine.:5724:19) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/formdata.js (evalmachine.:5881:49) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/body.js (evalmachine.:6094:35) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/response.js (evalmachine.:6510:49) at __require (evalmachine.:14:50) at (evalmachine.:11635:30) at requireFn (file://C:\Users\Bayram\Desktop\nextapi\node_modules\next\dist\compiled\edge-runtime\index.js:1:7079) { middleware: true

Upgrading node fixes this. Check: vercel/next.js#42729

from next-learn.

maniatoffl avatar maniatoffl commented on May 18, 2024

Updating Node version didn't work for me, I had to remove next 13 middleware.ts under src folder, and created custom server.js for handling middlewares. The issue then resolved for me .

from next-learn.

eichgi avatar eichgi commented on May 18, 2024

@maniatoffl It seems you need to use node v16.4 at least in order to use a middleware.ts file as I did.

Source: https://stackoverflow.com/questions/74739282/next-js13-middleware-occurs-typeerror-class-extends-value-undefined-is-not-a-c

from next-learn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.