core icon indicating copy to clipboard operation
core copied to clipboard

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

Open workenaadb opened this issue 1 year ago • 5 comments

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 avatar Feb 17 '25 13:02 workenaadb

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
      //   }
      // }
    })
  )

workenaadb avatar Feb 17 '25 13:02 workenaadb

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

ScriptedAlchemy avatar Feb 20 '25 01:02 ScriptedAlchemy

tagging in @gioboa for visibility.

zackarychapple avatar Feb 20 '25 01:02 zackarychapple

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.

gioboa avatar Feb 20 '25 08:02 gioboa

I created the issue on vite plugin . https://github.com/module-federation/vite/issues/258 Thank you @ScriptedAlchemy and @gioboa

workenaadb avatar Feb 22 '25 08:02 workenaadb

Stale issue message

github-actions[bot] avatar Apr 23 '25 15:04 github-actions[bot]