Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless fails to deploy - Webback error, "Invalid configuration object" #4788

Closed
ffxsam opened this issue Mar 1, 2018 · 3 comments
Closed

Comments

@ffxsam
Copy link
Contributor

ffxsam commented Mar 1, 2018

This is a (Bug Report / Feature Proposal)

Description

For bug reports:

  • What went wrong?

Deploy won't work, webpack config is invalid.

  • What did you expect should have happened?

I expected deploy to work.

  • What was the config you used?

Fresh creation of a project:

$ sls create -u aws-nodejs-ecma-script -n mytest
$ sls plugin install -n serverless-webpack
$ sls deploy
  • What stacktrace or error message from your provider did you see?
  Webpack Options Validation Error -----------------------

  Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module has an unknown property 'loaders'. These properties are valid:
   object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }
   -> Options affecting the normal modules (`NormalModuleFactory`).

Additional Data

  • Serverless Framework Version you're using: 1.26.1
  • Operating System: macOS 10.13.3
  • Stack Trace:
  • Provider Error messages:
@ffxsam
Copy link
Contributor Author

ffxsam commented Mar 1, 2018

Never mind, this is an issue with the serverless-webpack plugin.

@ffxsam ffxsam closed this as completed Mar 1, 2018
@HyperBrain
Copy link
Member

Hi @ffxsam , thanks for the report 👍

It seems that the webpack config contains a module.loaders property which has been deprecated by webpack and is replaced by a module.rules property now. It can be that the plugin install command now installed webpack 4 where this is removed now.

The reason is an unlimited peer dependency version specifier in serverless-webpack that will be fixed with the next release.

@ffxsam
Copy link
Contributor Author

ffxsam commented Mar 1, 2018

Yep, no worries! I've just modified package.json to use webpack 3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants