Hi there -- been a long-time user of jGrowl in a legacy Rails app that we're migrating to Yarn/Webpack for dependency management.
At the moment, when I include jGrowl in our package.json file:
"jgrowl": "^1.4.6",
and run yarn install
, the jGrowl module that shows up in node_modules
also brings along its own node_modules
subfolder, including its own jQuery v3.6.0.
We've been using JGrowl version 1.4.6 for a while but have been back on jQuery 2.x... and have never noticed a problem. However, the jGrowl package.json specifies jQuery ^3.4.1.
So... as you can imagine Webpack then ends up loading two copies of jQuery: the global v2.x that we install first, and the version 3.4 brought along by jGrowl.
jGrowl is then being attached to this second v3 jQuery instead of the first v2.x jQuery we install and export as a global for use by our legacy JS... so our legacy JS cannot access jGrowl.
I've confirmed that jGrowl does work as expected if I manually delete jGrowl's node_modules folder -- that removes the conflicting copy of jQuery and everything appears to work.
Which leads to the question:
Is jGrowl 1.4.6 only compatible with jQuery 3+?
I'm hoping that if 1.4.6 does in fact work with jQuery 2.x, perhaps adjusting the dependency in the package.json will fix the install issue.
Thanks in advance for any thoughts -- kind of miss the days when questions and issues were actually about using libraries, instead of just installing them...