question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NextJS dev and build mismatch

See original GitHub issue

What 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",

Screenshot 2022-01-25 at 21 03 23

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
milanbgd011commented, Feb 26, 2022

@bradlc

This is also resolved for me. Thank you very much for this!

2reactions
brianlovincommented, Jan 28, 2022

I’ve started encountering this as well:

Screen Shot 2022-01-27 at 21 28 29@2x

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found