Closed shaohuahuang closed 7 years ago
Hello @shaohuahuang,
Thank you for reporting this error, I will check it as soon as possible. However, feel free to make a pull-request if you can contribute !
@neveldo, maybe there are any news for this issue?
Hello,
I haven't worked on it for now. Maybe you could make a pull-request if you know how to fix it ?
has this been fixed yet? Getting this exact error while trying to use mapael with npm.
If not does anybody have a workaround/potential fix they are working on?
it seems as if NPM needs the require as 'jquery-mousewheel'
instead of just 'mousewheel'
since that is what the package is called in the NPM repo's and what webpack expects.
Simply changing the require from 'mousewheel'
to 'jquery-mousewheel'
in jquery.mapael.js
fixed this for me.
not sure how that would play out with bower
now the maps aren't being found, but that might just be my own personal issue....
Hello @InsidiousMind , could you provide me a test script that show the issue with webpack ?
I have fixed the issue, and it should now work fine : https://github.com/neveldo/jQuery-Mapael/commit/a83bd3a11e635ed9ffe99c070edb275f5c2cc9e4 (this fix will be included in the next release that will come very soon)
Hi. I try to bundle jquery.mapael.js and world_countries.js using webpack, but it gives the error shown above saying the modules mousewheel and mapael cannot be resolved.
I think the issue is caused by requiring wrong modules in the js files.
For jquery.mapael.js, it requires mousewheel, rather jquery-mousewheel, seen from the code extract below:
module.exports = factory(require('jquery'), require('raphael'), require('mousewheel'));
For world_countries.js, the same thing happens that it require mapael, rather than jquery-mapael.
module.exports = factory(require('jquery'), require('mapael'));