It seems you are using require.js because the error message is coming from it.
And the Mismatched anonymous define() module
means that toaster.js was defined as an anonymous module but it was not loaded through require.js module loading mechanism.
So there is two solution for this in your case:
- If you are using require.js, use that to load toaster.js
- If it was not intended to use require.js, just remove the reference from your page and toaster.js will load just fine