Static GitHub Issues

[1488] WebpackOptionsValidationError, Unable to build

prev: Nuxt with Express Startkit Deploy to Azure Web App
next: Allow assets to be exported with a prefix

The command nuxt build fails throwing an error WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. on Heroku.

Stack trace:

nuxt:build Building... +0ms
[AXIOS] Base URL: https://now-staging.hl.com/ , Browser: https://now-staging.hl.com/
  nuxt:build App root: /Users/aslam/Work/hl-student-web +0ms
  nuxt:build Generating /Users/aslam/Work/hl-student-web/.nuxt files... +0ms
  nuxt:build Generating files... +5ms
  nuxt:build Generating routes... +17ms
  nuxt:build Building files... +26ms
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module.rules[2].use should be one of these:
   non-empty string | function | object { loader?, options?, query? } | function | [non-empty string | function | object { loader?, options?, query? }]
   Details:
    * configuration.module.rules[2].use should be a string.
    * configuration.module.rules[2].use should be an instance of function.
    * configuration.module.rules[2].use should be an object.
    * configuration.module.rules[2].use should be one of these:

Complete stacktrace: https://gist.github.com/aslam/b1e4bfb4a8c07ce158dd44ccaafdaea1

My package.json looks like this: https://gist.github.com/aslam/d14bf1efdfcec8a1dcbcce32ab3fd5d9

and nuxt.config.js: https://gist.github.com/aslam/35302868dbc9ab75ad6deae7e89f53cf

The build works locally. I have specified the node and npm versions to use in package.json so that the Heroku box also use the same versions as I am.

"node": "6.11.0",
"npm": "3.10.10",
"yarn": "0.27.5"
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1324">#c1324</a>)</em></sub></div>