I had the same problem. Solved by updating Next.js and React.
Updating next.js
npm install next@latest
Updating react version in the next.js app:
npm upgrade react@latest react-dom@latest
Source:
https://www.codegrepper.com/code-examples/shell/how+to+update+next+js+version
Related Contents:
- Next.js is not recognizing ‘@types/react’
- What TypeScript type should NextJS _app.tsx Component and pageProps be?
- Use async await with Array.map
- In Angular, how do you determine the active route?
- TypeScript, Looping through a dictionary
- How to parse JSON string in Typescript
- Error: ‘types’ can only be used in a .ts file – Visual Studio Code using @ts-check
- How can I get the Typescript compiler to output the compiled js to a different directory?
- Server Discovery And Monitoring engine is deprecated
- ‘React’ refers to a UMD global, but the current file is a module
- Property ‘catch’ does not exist on type ‘Observable’
- ‘File name differs from already included file name only in casing’ on relative path with same casing
- TypeScript TS7015: Element implicitly has an ‘any’ type because index expression is not of type ‘number’
- Jest – Simple tests are slow
- What Typescript type is Angular2 event
- Check if an object implements an interface at runtime with TypeScript
- RegExp in TypeScript
- How to throw an observable error manually?
- How to instantiate, initialize and populate an array in TypeScript?
- TypeScript import/as vs import/require? [duplicate]
- How to make Visual Studio Code check entire project for errors?
- Webpack cant resolve TypeScript modules
- Regions in TypeScript [closed]
- How to break ForEach Loop in TypeScript
- VS Code: “Breakpoint ignored because generated code not found” error
- router.navigate with query params Angular 5
- Keep getting “tsc.exe” exited with code 1
- Does a async function which returns Promise have an implicit return at the end of a block?
- RxJs pipe and lettable operator `map`: ‘this’ context of type ‘void’ is not assignable to method’s ‘this’ of type ‘Observable’
- Unit testing using Jasmine and TypeScript
- Can’t resolve all parameters for Router: (?, ?, ?, ?, ?, ?, ?) in Angular RC 5 when unit testing
- A module cannot have multiple default exports
- Why eslint consider JSX or some react @types undefined, since upgrade typescript-eslint/parser to version 4.0.0
- Migrating create-react-app from javascript to typescript
- Can’t do a default import in Angular 9
- How to await multiple Promises?
- Determine if a CSS class exists with Javascript
- How to use es6 template literal as Angular Component Input
- Typescript abstract optional method
- Angular2 module has no exported member
- declaration or statement expected javascript/typescript
- How to achieve a debounce service on input keyup event in angular2 with rxjs
- Property ‘current’ does not exist on type ‘((instance: HTMLDivElement | null) => void) | RefObject’
- How to set document’s title per page?
- TypeScript vs JSX [closed]
- TypeScript error: Property ‘scrollIntoView’ does not exist on type ‘never’. TS2339
- Why push shows argument of type ‘any[]’ is not assignable to parameter of type ‘never’ error?
- Next.js: Error: React.Children.only expected to receive a single React element child
- Replacement of Elvis Operator of Angular2 in Typescript
- How to detect key pressed in TypeScript?