CodeSeven / toastr

Simple javascript toast notifications
http://www.toastrjs.com
MIT License
11.98k stars 2.04k forks source link

toastr is not defined #515

Open zhbzhbzhbz opened 7 years ago

zhbzhbzhbz commented 7 years ago

Since I am using Electron (Node.js+Chrome), I have to add the following code <script>window.$ = window.jQuery = require('./js/jquery-3.1.1.min.js');</script> Then I got the error "toastr is not defined". After I deleted "undefined"!=typeof module&&module.exports?module.exports=t( window.jQuery ): ,it works well. But i'm afraid that there will be bugs. So what's your suggestion on this issue?~Thanks

setni commented 7 years ago

Jquery conflict? Did you try to change window.jQuery be window.myObject?

mwkcoding commented 5 years ago

I have the same issue with toastr not being defined in a Laravel 5.7 project. Installed with npm. jQuery version: 3.3.1

robertnicjoo commented 5 years ago

Same issue here using npm, ReferenceError: toastr is not defined

sahanpasindu commented 5 years ago

Same issue in Laravel 5.7 with manual js and css link and two errors 1) Uncaught SyntaxError: Unexpected token ? 2) Uncaught ReferenceError: toastr is not defined

I have changed Jquery version 3.3.1 to 1.9.1 and 2.2.4 it is worked!, seems it has some problem with Jquery version (3.3.1)

JPeer264 commented 4 years ago

Maybe you can check out my fork. Functionality is the same, just the animations are still missing (I am working on this).

https://github.com/JPeer264/toastr2