Skip to content

Error: Cannot read properties of undefined (reading 'ProvidePlugin') #53

@harsh183

Description

@harsh183

Using "node-polyfill-webpack-plugin": "^4.0.0" after just ejecting on latest react scripts (5.0.1) with Node 16.

In the config

// other imports
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

// other config
plugins: [
        new NodePolyfillPlugin(),
        new ModuleScopePlugin(...)
]

the rest is exactly what eject gives. I tried commenting ModuleScopePlugin but that didn't do anything.

I can verify that ProvidePlugin doesn't exist anywhere within my codebase, and looks like it's something inherent to webpack

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