question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to resolve modules mousewheel and mapael in CommonJS in version 2.0.0

See original GitHub issue
ERROR 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:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
neveldocommented, Mar 12, 2017

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)

0reactions
neveldocommented, Feb 27, 2017

Hello @InsidiousMind , could you provide me a test script that show the issue with webpack ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found