You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Angular Native Federation Shell应用启动时出现@angular/platform-browser模块解析失败的TypeError问题求助

Angular Native Federation Shell应用启动时出现@angular/platform-browser模块解析失败的TypeError问题求助

大家好,我目前正在用@angular-architects/native-federation搭建一个作为Shell的Angular应用,结果启动后浏览器控制台直接抛出了这样的错误:

TypeError: Failed to resolve module specifier "@angular/platform-browser". Relative references must start with either "/", "./", or "../". main.ts:6 (anonymous)

错误提示明确指向我main.ts文件的第6行,也就是这行动态导入代码:import('./bootstrap')。我已经确认过@angular/platform-browser依赖已经正确安装在项目里,package.json里能看到它的版本信息,node_modules目录下也有对应的包文件,但就是解决不了这个模块解析失败的问题。有没有哪位大佬遇到过类似的情况,能给我一些排查方向或者解决思路呀?

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.08 12:43:10