question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack validation error

See original GitHub issue

A new webpack version as just released, which makes bundle fail here with the following error:

Serverless: Could not load webpack config '/Users/mgodoy/project/serverless-bundle/src/webpack.config.js'
 
 Validation Error ----------------------------------------
 
  ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema.
   - options should be one of these:
     object { resourceRegExp, contextRegExp? } | object { checkResource }
     Details:
      * options misses the property 'resourceRegExp'. Should be:
        RegExp
        -> A RegExp to test the request against.
      * options misses the property 'checkResource'. Should be:
        function
        -> A filter function for resource and context.
      at validate (/Users/mgodoy/project/serverless-bundle/node_modules/webpack/node_modules/schema-utils/dist/validate.js:105:11)
      at /Users/mgodoy/project/serverless-bundle/node_modules/webpack/lib/util/create-schema-validation.js:16:17
      at new IgnorePlugin (/Users/mgodoy/project/serverless-bundle/node_modules/webpack/lib/IgnorePlugin.js:28:3)
      at plugins (/Users/mgodoy/project/serverless-bundle/src/webpack.config.js:370:16)
      at Object.<anonymous> (/Users/mgodoy/project/serverless-bundle/src/webpack.config.js:452:12)
      at Module._compile (internal/modules/cjs/loader.js:1072:14)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
      at Module.load (internal/modules/cjs/loader.js:937:32)
      at Function.Module._load (internal/modules/cjs/loader.js:778:12)
      at Module.require (internal/modules/cjs/loader.js:961:19)
      at require (internal/modules/cjs/helpers.js:92:18)
      at ServerlessPlugin.validate (/Users/mgodoy/project/serverless-bundle/node_modules/serverless-webpack/lib/validate.js:152:31)
      at ServerlessPlugin.tryCatcher (/Users/mgodoy/project/serverless-bundle/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/Users/mgodoy/project/serverless-bundle/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/Users/mgodoy/project/serverless-bundle/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromiseCtx (/Users/mgodoy/project/serverless-bundle/node_modules/bluebird/js/release/promise.js:641:10)
      at _drainQueueStep (/Users/mgodoy/project/serverless-bundle/node_modules/bluebird/js/release/async.js:97:12)
      at _drainQueue (/Users/mgodoy/project/serverless-bundle/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/Users/mgodoy/project/serverless-bundle/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/Users/mgodoy/project/serverless-bundle/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:464:21)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ekremkentercommented, Sep 17, 2021

Anyone with any fixes or a way to avoid that?

0reactions
knvpkcommented, Nov 14, 2021

Looks like a duplicate of the issue I opened back in August #259 but that one seems to have more visibility.

I tried upgrading to 5.0.2 but I’m still having the same issue, anyone was able to solve it?

yes with 5.0.2 also still issue exists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack Options Validation Error - Stack Overflow
I set up the webpack inside my root folder. Here's my webpack.config.js: const path = require("path"); const ...
Read more >
Using default Webpack5 setup ERR! ValidationError: Invalid ...
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. #17357.
Read more >
Validate your Webpack config with webpack-validator
With webpack-validator, you can save yourself a ton of time by validating that your webpack configuration is free of common mistakes. Note: Webpack...
Read more >
Webpack has been initialized using a configuration object
Failed to compile with 1 errors 12:12:06 AM error in ./resources/js/components/App.vue Module parse failed: Unexpected token (1:0) You may need an appropriate ...
Read more >
an unhandled exception occurred: invalid configuration object ...
Here is an error after running npm run start on my node application. PluginError [ValidationError]: Invalid configuration object. Webpack has been initialized ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found