Skip to content

Error running webpack #55

Open
Open
@jannovergara

Description

@jannovergara

I ran webpack for the first tutorial I encountered this issue:

$ webpack
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).

From serverless/serverless#4788

Fixed by changing loaders to rules in webpack.config.js
But then saving and running webpack again I encountered another issue.

ERROR in ./js/client.js
Module build failed (from ../node_modules/babel-loader/lib/index.js):
TypeError: Cannot read property 'babel' of undefined
at Object.module.exports (<skip>..\react-js-tutorials\1-basic-react\node_modules\babel-loader\lib\index.js:103:36)

Hope you can help me on this thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions