logologo
指南
实践
配置
插件
案例
博客
生态
Module Federation Examples
Practical Module Federation
Zephyr Cloud
Nx
简体中文
English
指南
实践
配置
插件
案例
博客
Module Federation Examples
Practical Module Federation
Zephyr Cloud
Nx
简体中文
English
logologo

开始

介绍
设置环境
快速上手
功能导航
名词解释
npm 包

基础

运行时

Runtime 接入
Runtime API
Runtime Hooks
Rsbuild Plugin
Rspack 插件
Webpack Plugin
Rspress Plugin
Vite Plugin
Metro
类型提示
命令行工具
样式隔离

数据管理

数据获取
数据缓存
Prefetch

框架

Modern.js
Next.js

部署

使用 Zephyr Cloud 部署

调试

开启调试模式
Chrome Devtool
全局变量

Troubleshooting

概览

运行时

RUNTIME-001
RUNTIME-002
RUNTIME-003
RUNTIME-004
RUNTIME-005
RUNTIME-006
RUNTIME-007
RUNTIME-008
RUNTIME-009

构建

BUILD-001
BUILD-002

类型

概览
TYPE-001
其他
Edit this page on GitHub
Previous Page概览
Next PageRUNTIME-002

Failed to get remoteEntry exports.

  • Error Code: RUNTIME-001

#原因

当生产者入口文件被正常加载后,会在全局对象(globalThis/window)注册此生产者,该生产者可以通过 window[remoteEntryKey] 访问。

然而在本次加载过程中,注册的生产者无法访问。该错误存在三种可能原因:

  1. remoteEntryUrl 不正确
  2. 生产者入口文件没有正常挂载容器
  3. 网络问题,该资源无法访问

#解决方法

针对原因,有对应的解决方法:

  1. 检查生产者入口地址是否正确 如果使用的是 manifest ,那么检查 manifest 中的 publicPath 和 remoteEntry.name 字段
  2. 若项目构建器为 rspack ,查看最终构建配置是否设置了 runtimeChunk ,若是则删除此配置
  3. 检查该资源是否是外部可访问