_.mixin is not a function
See original GitHub issueUsing node and webstorm, when I start my app I get this error:
\node_modules\corejs-typeahead\dist\typeahead.bundle.js:195 _.mixin(LruCache.prototype, { ^
TypeError: _.mixin is not a function
Has anyone else experianced this issue or know what causes it?
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
mixin is not a function - Magento Stack Exchange
If you're having issues with mixin: Make sure you're using define() , not require() . That was the issue for me.
Read more >this.mixIn is not a function - Stack Overflow
I've tried a different versions of aes.js and the problem is still showing up . this is the code : $(document).ready(function ...
Read more >What does the error “Uncaught TypeError: mixin is not a ...
If you see the error "mixin is not a function", it should be following behind another JavaScript error such as "Unexpected identifier.".
Read more >run generate, global mixin (... is not a function) #10024 - GitHub
Hi guys. I have made some global mixes and they work fine as long as I make run dev command. But when I...
Read more >Magento: Magento 2.3.1 Uncaught TypeError: mixin is not a ...
JavaScript Mixins in Magento 2 - Practical Tutorial · Top 5 Excel Functions for Finance People (with end-to-end example) · Magento 2 Theme ......
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
ok the problem (for me and probably for others as well) is that we run the code as well on the server side, for example rendering react on the server side and then serve html to the client.
since the code of jquery requires document :
every function under $ is undefined, specifically $.extend and thus _.mixin is undefined
possible solutions :
fetch typehead with lazy loading on client side only (can be done with split point, dynamic loading script with webpack) for react you could require this library at componentDidMount
solution within the typehead library ?
Thank for your reply.
I’m loading the module dynamically as well, my import statement is on the
attached()
handler of an esNext module. I’m using Aurelia with Server Side Rendering, that’s why using a classicimport {Bloodhound} from "corejs-typeahead";
thows the original error in this post.Here’s the context in which I attempt the dynamic import.
Well, I was trying whether that would work, because importing
corejs-typeahead
gives exactly the same error:Cannot set property 'Bloodhound' of undefined
, by which they meanroot
in the snippet of my previous comment.But i guess you never ran into that one.