ScriptExternalLoadError: Loading script failed. – Module Federation: React + Typescript

I am trying to run basic MF apps using React + Typescript.

used create-mf-app to generate boilerplate-code. On top of it just added only one component Cookie.tsx. Nothing is in there. Just a p tag.

I am getting below issue which I am not able to find a solution.

ERROR
Loading script failed.
(missing: http://localhost:8081/remoteEntry.js)
while loading "./Cookie" from webpack/container/reference/app1
ScriptExternalLoadError: Loading script failed.
(missing: http://localhost:8081/remoteEntry.js)
while loading "./Cookie" from webpack/container/reference/app1
    at webpack/container/reference/app1 (http://localhost:8080/main.js:79:25)
    at __webpack_require__ (http://localhost:8080/runtime.js:36:33)
    at initExternal (http://localhost:8080/runtime.js:316:28)
    at __webpack_require__.I (http://localhost:8080/runtime.js:329:15)
    at http://localhost:8080/runtime.js:821:47
    at webpack/sharing/consume/default/react/react (http://localhost:8080/runtime.js:875:67)
    at http://localhost:8080/runtime.js:906:56
    at Array.forEach (<anonymous>)
    at __webpack_require__.f.consumes (http://localhost:8080/runtime.js:889:36)
    at http://localhost:8080/runtime.js:122:40

Leave a Comment