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

error when runing app (Cannot use 'in' operator to search for 'requests' in null) #3523

Open
workenaadb opened this issue Feb 17, 2025 · 5 comments

Comments

@workenaadb
Copy link

workenaadb commented Feb 17, 2025

Describe the bug

When i try load a remote module from a vite app in a react app ( using create-react app and config ovverride) it show Cannot use 'in' operator to search for 'requests' in null .

Image

I try to find its reletive code,i found

Image
and log externalModule , it was null

Reproduction

''

Used Package Manager

npm

System Info

System:
    OS: Windows 10 10.0.20348
  
  Binaries:
    Node: 22.6.0 
  
    npm: 10.8.2 
   
  Browsers:
    Chrom: ```

### Validations

- [x] Read the [docs](https://github.com/module-federation/core).
- [x] Read the [common issues list](https://github.com/module-federation/core/issues).
- [x] Check that there isn't [already an issue](https://github.com/module-federation/core/issues) that reports the same bug to avoid creating a duplicate.
- [x] Make sure this is a Module federation issue and not a framework-specific issue.
- [ ] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@workenaadb
Copy link
Author

workenaadb commented Feb 17, 2025

this is my cra module federation config

  config.plugins.push(
    new ModuleFederationPlugin({
      name: "webpack_provider",
      filename: "remoteEntry.js",
      remotes: {
        vite_provider: "vite_provider@http://localhost:4173/mf-manifest.json"
      }
      // shared: {
      //   react: {
      //     singleton: true
      //   },
      //   "react-dom": {
      //     singleton: true
      //   }
      // }
    })
  )

@ScriptedAlchemy
Copy link
Member

id suggest using rsbuild instead of vite, the issue is likely with the vite plugin implementation, file the issue on module-federation/vite

@zackarychapple
Copy link
Collaborator

tagging in @gioboa for visibility.

@gioboa
Copy link

gioboa commented Feb 20, 2025

id suggest using rsbuild instead of vite, the issue is likely with the vite plugin implementation, file the issue on module-federation/vite

I see, sorry for that.
I'm looking forward to using the official Vite plugin.

@workenaadb
Copy link
Author

I created the issue on vite plugin . module-federation/vite#258
Thank you @ScriptedAlchemy and @gioboa

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

4 participants