vercel / next.js

The React Framework
https://nextjs.org
MIT License
127.45k stars 27.04k forks source link

Error on browsers like chrome 83 #71399

Open ViniciusLeviVL opened 1 month ago

ViniciusLeviVL commented 1 month ago

Link to the code that reproduces this issue

https://github.com/ViniciusLeviVL/next-catalogo-digital-debug2

To Reproduce

Steps to reproduce: Just init a next project with create-next-app@latest, deploy and see using a emulator like appetize.io (need to be deployed in web first) or insomnia (can reproduce in development environment)

https://appetize.io/demo?device=galaxytabs7&osVersion=11.0&record=true&debug=true&proxy=intercept&enableAdb=true

Current vs. Expected behavior

I have a project with next.js and this month some old browsers is getting error on load, i tryed init a new project with the default template of next and it's getting error too, did not next support browsers like chrome 83 ?

I deployed my project on vercel to make sure that's not my server, but still getting these errors

https://next-catalogo-digital.vercel.app

Images:

Error stack in my globar-error.tsx

Browser version of emulator

Provide environment information

Versions: 

Node: 20.16.0
Browser: Chrome 83 ...
Next: 14.2.15

My package.json:

{
  "name": "next-example",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "react": "^18",
    "react-dom": "^18",
    "next": "14.2.15"
  },
  "devDependencies": {
    "typescript": "^5",
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "postcss": "^8",
    "tailwindcss": "^3.4.1",
    "eslint": "^8",
    "eslint-config-next": "14.2.15"
  }
}


### Which area(s) are affected? (Select all that apply)

create-next-app, Pages Router, Parallel & Intercepting Routes

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)

### Additional context

I tested in next 13, 14 and 15
darthmaim commented 1 month ago

Chrome 83 is over 4 years old...

ViniciusLeviVL commented 1 month ago

Chrome 83 is over 4 years old...

Is there any way to add support for this ?

A lot of users is using it

SaveliiLukash commented 1 month ago

Next.js claims to support Chrome 64+, so it should work, theoretically.

Maybe, you could try adding explicit Browserslist configuration to your project.

You can also learn more about it on their website, as well as compose queries and check browser support results.

As for the development environment, the default practice is to skip browser support for the sake of speed (you really want hot reload to work fast). So a typical query for dev might be like this: last 1 Chrome versions, last 1 Firefox versions ...

All of this you can customize for your needs, both dev and prod.

However, there is always the floor you can't go beneath. It is defined by the framework itself, as well as the pre-compiled node_modules you use in your project (they are transpiled by their authors). Like @tanstack/react-query@5 which is Chrome >= 91, unless you build it from source yourself.