Skip to content

Can't resolve 'http'? #34

@spyhunter99

Description

@spyhunter99

First of all, awesome library. i hope i can get it working.... I'm talking through the tutorial from https://github.com/Paciolan/remote-component, refresh react projects. I was able to get a react component to compile but was unable to get it to load in the main app. I then tried to load the tutorial's plugin via github. (kind of new to react/nodejs stuff so bare with me)...

Anyhow, this is the error i'm getting.

Module not found: Error: Can't resolve 'http' in 'myapp\node_modules\@paciolan\remote-module-loader\dist\lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
        - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "http": false }

i did try npm i stream-http http https but that didn't fix anything. Trying to understand the error message...is this a webpack versioning issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions