RobinHerbots/Inputmask

Module not found after v5.0.8

kcap-tha opened this issue · 4 comments

Seems something is going on with the export as you moved from 5.0.8 to 5.0.9 and beyond.
No change in my import syntax, but when I moved from version 5.0.8 to 5.0.9 and ran my usual 'yarn watch' I got the following error:

Module not found: Error: Package path ./dist/jquery.inputmask is not exported from package /private/var/www/site/node_modules/inputmask (see exports field in /private/var/www/site/node_modules/inputmask/package.json)

This is how I require inputmask in my app.js within encore webpack (symfony), and it has been this way for a year+.

require('inputmask/dist/jquery.inputmask');

  • OS: MacOS 14.7 Sonoma
  • Browser: N/A, it's at build time
  • Inputmask version: 5.0.9+

Only fix for me was to move back to 5.0.8. Reporting in case others have this issue or can suggest an update on how they are requiring the jquery dependency in the inputmask lib.

@kcap-tha ,

Can you have a try by adding the extension? require('inputmask/dist/jquery.inputmask.js'); I'm just curious if that works.

Can you also have a try with version 5.0.10-beta.11

@kcap-tha ,

Can you have a try by adding the extension? require('inputmask/dist/jquery.inputmask.js'); I'm just curious if that works.

@RobinHerbots , adding the ".js" for 5.0.9 did work, thank you.

Can you also have a try with version 5.0.10-beta.11

@RobinHerbots I can use 5.0.10-beta.11 without the ".js" extension so that's great news. Thank you for your quick response/work on this.