DEV Community

Discussion on: Using Ant Design with NextJS (custom variables for Ant Design)

Collapse
 
affanthebest profile image
Siddiqui Affan

Hey, I followed everything written in the post. But still can't make it run.

Error that I got:

ready - started server on 0.0.0.0:3000, url: localhost:3000
info - Using webpack 5. Reason: Enabled by default nextjs.org/docs/messages/webpack5
TypeError: Cannot set property 'styles' of undefined
at module.exports (C:\Users\name\Projects\nextjs\node_modules\@zeit\next-css\css-loader-config.js:25:56)
at Object.webpack (C:\Users\name\Projects\nextjs\node_modules\@zeit\next-css\index.js:15:36)
at Object.getBaseWebpackConfig as default
at async Promise.all (index 0)
at async HotReloader.start (C:\Users\name\Projects\nextjs\node_modules\next\dist\server\dev\hot-reloader.js:278:25)
at async DevServer.prepare (C:\Users\name\Projects\nextjs\node_modules\next\dist\server\dev\next-dev-server.js:252:9)
at async C:\Users\name\Projects\nextjs\node_modules\next\dist\cli\next-dev.js:121:9

Depndencies installed:
"@zeit/next-css": "^1.0.1",
"@zeit/next-less": "^0.0.4",
"@zeit/next-sass": "^0.0.4",
"antd": "^4.16.13",
"babel-plugin-import": "^1.13.3",
"bootstrap": "^5.1.0",
"less": "^4.1.1",
"mongodb": "^4.1.1",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",