Not able to resolve modules mousewheel and mapael in CommonJS in version 2.0.0
See original GitHub issueERROR in ../~/jquery-mapael/js/jquery.mapael.min.js
Module not found: Error: Cannot resolve module 'mousewheel' in /Users/AirShaos/Documents/dev/prospace_web/node_modules/jquery-mapael/js
@ ../~/jquery-mapael/js/jquery.mapael.min.js 14:92-113
ERROR in ../~/jquery-mapael/js/maps/world_countries.js
Module not found: Error: Cannot resolve module 'mapael' in /Users/AirShaos/Documents/dev/prospace_web/node_modules/jquery-mapael/js/maps
@ ../~/jquery-mapael/js/maps/world_countries.js 14:52-69
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'));
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Node Modules at War: Why CommonJS and ES ... - Code Red
Interop between them is possible, but it's a hassle · You can't require() ESM scripts; you can only import ESM scripts, like this:...
Read more >Debian -- Software Packages in "sid", Subsection javascript
JavaScript utility for merging multiple objects into one. libjs-microplugin.js (0.0.3+dfsg-1.1): Lightweight plugin / dependency system for ...
Read more >Software Packages in "kinetic", Subsection web - Ubuntu
JavaScript utility for merging multiple objects into one. libjs-microplugin.js (0.0.3+dfsg-1.1) [universe]: Lightweight plugin / dependency system for libraries ...
Read more >GE Operations Hub - Open Source Software List (for Version 1.7)
https://github.com/ivpusic/socket.io- cookie. MIT. Not Found babel-plugin-transform- es2015-modules-commonjs. 6.26.2 https://github.com/babel/babel.
Read more >Dependency-Check Report
dependency-check version: 6.1.6; Report Generated On: Wed, 9 Jun 2021 16:03:40 -0700; Dependencies Scanned: 162 (154 unique); Vulnerable Dependencies: 12 ...
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 Free
Top 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
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)
Hello @InsidiousMind , could you provide me a test script that show the issue with webpack ?