next.js: options has an unknown property 'localIdentName'

Bug report

Describe the bug

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. 스크린샷 2019-10-04 오후 4 06 05

if cssModule/cssLoaderOptions is removed, not problem… why error plz?

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS
  • Browser : chrome
  • Version of Next.js: 9.0.7

Additional context

Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

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? }

@Timer It’s fixed. Thank you.

This is fixed in next@9.0.8-canary.3 Try updating next tothe latest canary build