NextJS dev and build mismatch
See original GitHub issueWhat I did?
- installed package (latest tailwind installed)
- restarted server with
npm run dev
- entered couple of files and hit save
- reformatting worked
What was the problem?
- when I tried to do
npm run build
I got a lot of ESLint errors caused by prettier - all errors suggested that the order is different than it should be
- I tried to delete .next dir, reinstall all and try to build again and still the problem remains
- vs code reported no errors in those files, they were reformatted properly, but build complained
Installed packages:
"eslint": "8.7.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-next": "12.0.8",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react-hooks": "4.3.0",
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"prettier": "^2.5.1",
"prettier-eslint": "13.0.0",
"prettier-plugin-tailwindcss": "^0.1.4",
"tailwindcss": "3.0.16",
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Next.js route mismatch in prod build but not in dev
For empty string value for primary, the static path becomes //article which resolves to /article. This is what the error says. Though this...
Read more >react-hydration-error - Next.js
When css-in-js libraries are not set up for pre-rendering (SSR/SSG) it will often lead to a hydration mismatch. In general this means the...
Read more >mismatch BUILD_ID in multi server #786 - vercel/next.js - GitHub
I have two server running a next program for load balancing, when I run npm run build in this two server, they generate...
Read more >SSR mismatch adventures in Next.js | by Mark Miro - Medium
SSR mismatch adventures in Next.js. I went back to update my personal site, and it was quite an adventure digging into some of...
Read more >Fix Next.js “Text content does not match server-rendered ...
Learn how to fix the React hydration error “Text content does not match server-rendered HTML” so you can personalize & transform HTML in ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bradlc
This is also resolved for me. Thank you very much for this!
I’ve started encountering this as well:
In this PR, my initial Vercel deploy failed, so I uninstalled this package and committed, then the next build completed successfully.
Could this be conflicting with the VSCode extension for intellisense in some way?