js-dxtools / webpack-validator

Validates your webpack config with Joi
MIT License
295 stars 29 forks source link

TypeError: Cannot read property 'returnValidation' of undefined #122

Closed NameFILIP closed 7 years ago

NameFILIP commented 7 years ago

After updating from 2.2.3 to 2.2.5 started getting this error:

TypeError: Cannot read property 'returnValidation' of undefined
    at validate (/Users/.../node_modules/webpack-validator/dist/index.js:122:29)
    ...

In my webpack.config.js I have:

const webpackConfig = { ... };
module.exports = validate(webpackConfig);

The workaround is to pass an empty object as a second argument:

module.exports = validate(webpackConfig, {});

but it looks like a regression and should be fixed

oieduardorabelo commented 7 years ago

Yep, here too, 2.2.3 to 2.2.5

kentcdodds commented 7 years ago

I think #121 will fix this.

kentcdodds commented 7 years ago

This will be released automatically as 2.2.6 soon

kentcdodds commented 7 years ago

Please re-open this issue if it is not resolved.