Uncaught TypeError: fn is not a function when modify shared-routing dashboard public index.html
See original GitHub issueI find http://localhost:3000/remoteEntry.js script file is load twice, one in head and another in body. So I delete the script in head. Modify code module-federation-examples/shared-routing/dashboard/public/index.html
<html>
<head>
<script src="http://localhost:3000/remoteEntry.js"></script>
<!-- <script src="http://localhost:3001/remoteEntry.js"></script> -->
<script src="http://localhost:3002/remoteEntry.js"></script>
<script src="http://localhost:3003/remoteEntry.js"></script>
<script src="http://localhost:3004/remoteEntry.js"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>
then run the Apps, visit http://localhost:3001/dashboard
index.html structure
Why 3001/remoteEntry.js file load order will cause the error? must manual add script in order?
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
TypeError: fn is not a function - discord.js - Stack Overflow
Your problem is this: message.guild.roles.cache.find()(args[1])); . First, find takes a function, (which causes the error shown).
Read more >JavaScript: Uncaught TypeError: n is not a function
This error occurs if you try to execute a function that is not initialized or is not initialized correctly.
Read more >WordPress 5.6 error “t.hasOwnProperty is not a function”
I am using default WordPress theme “Twenty Twenty-One” and all dashboard functionalities are broken. ... utils.min.js?ver=3.2.8.1:1 Uncaught TypeError: t.
Read more >Uncaught TypeError: $(...).sideNav is not a function
19.1/dist/index.html. However, I am getting these errors: 1) Uncaught ReferenceError: $ is not defined but jquery.min.js is included at the ...
Read more >How to solve the "is not a function" error in JavaScript
js we use require() to load external modules and files. This can cause, in some cases, an error like this: TypeError: require(...) is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem I think is because you have the element with id which is equals to the name of your remote component. Try to find that element and change the id of it
make the id of the div in the body of the HTML file of the different micro apps i.e container and dashboard different