Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not compile code with tailwindcss@2.0.2 and next.js^10.0.0 #3503

Closed
Francis-Tao-jinjin opened this issue Feb 2, 2021 · 1 comment
Closed

Comments

@Francis-Tao-jinjin
Copy link

I am using next^10, I install Tailwind CSS by following the instruction in tailwind's doc.
Here is my package.json:
{ "name": "learn-starter", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "export": "next build && next export" }, "dependencies": { "autoprefixer": "^10.2.4", "date-fns": "^2.16.1", "gray-matter": "^4.0.2", "highcharts": "^9.0.0", "highcharts-react-official": "^3.0.0", "next": "^10.0.0", "react": "17.0.1", "react-dom": "17.0.1", "remark": "^13.0.0", "remark-html": "^13.0.1", "sass": "^1.32.6", "tailwindcss": "^2.0.2" }, "devDependencies": { "postcss": "^8.2.4" } } ,
I didn't modify anything in postcss.config.js and tailwind.config.js.
Every time I run npm run dev, it throws the error:
error - ./styles/global.css ((webpack)/css-loader/cjs.js??ref--5-oneOf-6-1!(webpack)/postcss-loader/cjs.js??ref--5-oneOf-6-2!./styles/global.css) TypeError: Object.entries(...).flatMap is not a function at Array.forEach (<anonymous>)

@richadr
Copy link

richadr commented Feb 2, 2021

Upgrade node to 12.13.0 or higher

https://tailwindcss.com/docs/guides/nextjs#setting-up-tailwind-css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants