next.config.js
module.exports = withCSS(withSass({
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
localIdentName: "[local]___[hash:base64:5]",
},
webpack(config) {
HACK_removeMinimizeOptionFromCssLoaders(config);
config.module.rules.push({
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000
}
}
})
// config.module.rules.push({
// test: /\.scss$/,
// use: [
// ]
// })
return config
},
sassLoaderOptions: {
sourceMap: true
}
}));
A clear and concise description of what the bug is.

if cssModule/cssLoaderOptions is removed, not problem..
why error plz?
Steps to reproduce the behavior, please provide code snippets or a repository:
A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.
This is fixed in [email protected]
Try updating next tothe latest canary build
i tried to install [email protected], but the same error occurred
i tried to install [email protected], but the same error occurred
Are you sure you are on "[email protected] ? "
If this doesnt work try this workaround suggested by @arunpdl for this same issue
Please try [email protected] instead.
Thank you for your answers.
but the same error occurred...
"dependencies": {
"@zeit/next-css": "^1.0.1",
"@zeit/next-sass": "^1.0.1",
"axios": "^0.19.0",
"classnames": "^2.2.6",
"next": "^9.0.8-canary.4",
"node-sass": "^4.12.0",
"prettier": "^1.18.2",
"react": "^16.10.1",
"react-dom": "^16.10.1",
"sass-loader": "^8.0.0"
},

@dijer119 please provide a fully reproducible project. Otherwise, we cannot fix this.
@Timer
i made sample project
please check it.
https://github.com/dijer119/next-style
@dijer119 you must remove HACK_removeMinimizeOptionFromCssLoaders... this code is causing it to break.
@Timer
If removed, the error below will occur.
Module not found: Can't resolve 'css-loader/locals' in '/Users/dijer/dev/workspace_sa/next-style'
@dijer119 fix up in https://github.com/zeit/next.js/pull/8970. Will release as [email protected] shortly.
@Timer
It's fixed. Thank you.
same issue @9.1.1
You may need 9.1.2-canary.1.
I'm having the exact same issue while trying to update from next 9.2.1 to 9.3.1.''
ValidationError: Invalid options object. CSS Loader has been initialized using an options object that does not match the API schema.
- options has an unknown property 'localIdentName'. These properties are valid:
- object { url?, import?, modules?, sourceMap?, importLoaders?, localsConvention?, onlyLocals?, esModule? }
Most helpful comment
I'm having the exact same issue while trying to update from next 9.2.1 to 9.3.1.''