OnrampLab / next-starter

A starter project for Next.js with TypeScript
next-starter-eight-iota.vercel.app
MIT License
3 stars 1 forks source link

Upgrade nextjs to v10, react to v17, tailwindcss to v2 #100

Closed koshuang closed 3 years ago

koshuang commented 3 years ago

Upgrde:

koshuang commented 3 years ago

Error when upgrading tailwindcss

TypeError: Invalid PostCSS Plugin found at: plugins[0]

(@/home/kos/git/onramplab/next-starter/postcss.config.js)
    at Array.forEach (<anonymous>)

Issue: https://github.com/tailwindlabs/tailwindcss/issues/2795

Solution: https://tailwindcss.com/docs/installation#post-css-7-compatibility-build

Once the rest of your tools have added support for PostCSS 8, you can move off of the compatibility build by re-installing Tailwind and its peer-dependencies using the latest tag:

npm uninstall tailwindcss @tailwindcss/postcss7-compat
npm install tailwindcss@latest postcss@latest autoprefixer@latest