NPM Advance-element/Moment-with-locales.min.js

Asked

Viewed 42 times

-2

I’m having trouble at Laravel-mix with this

WARNING Compiled with 1 warnings 20:53:09

This relative module was not found:

  • ./locale in . /Resources/Assets/pages/Advance-Elements/Moment-with-locales.min.js Asset Size Chunks Chunk Names images/vendor/datedropper/css/dd-icon/dd-icon.svg? 92ba9af80fd03d0fa6671d1557c871a0 1.78 kB [Emitted]
    fonts/themify9f24.eot? 2c454669bdf3aebf32a1bd8ac1e0d2d6 78.7 kB [Emitted]
    fonts/themify9f24.Woff? a1ecc3b826d01251edddf29c3e4e1e97 56.1 kB [Emitted]
    fonts/themify9f24.ttf? e23a7dcaefbde4e74e263247aa42ecd7 78.6 kB [Emitted]
    fonts/themify9f24.svg? 9c8e96ecc7fa01e6ebcd196495ed2db5 234 kB [Emitted]
    fonts/vendor/datedropper/css/dd-icon/dd-icon.eot? dedadb487a0539d3a4dbdba5edb07fe9 2.02 kB [Emitted]
    fonts/vendor/datedropper/css/dd-icon/dd-icond41d.eot? dedadb487a0539d3a4dba5edb07fe9 2.02 kB [Emitted]
    fonts/vendor/datedropper/css/dd-icon/dd-icon.Woff? 08bf52b3bbaf74a1e40c963c1ca78654 1.4 kB [Emitted]
    fonts/vendor/datedropper/css/dd-icon/dd-icon.ttf? b3fadd59b04db9316c75d82b7694f3be 1.86 kB [Emitted]
    fonts/themifyd41d.eot? 2c454669bdf3aebf32a1bd8ac1e0d2d6 78.7 kB [Emitted]
    images/throbber.gif? 65741b78f605e4d22eb4ad9570552c92 1.49 kB [Emitted]
    images/details_open.png? ed1324976fd1dcb0d747a7ca5fc3ccc7 709 bytes [Emitted]
    images/details_close.png? cdb0ad00d71eff5be6ca7305cff83ce9 686 bytes [Emitted]
    images/bg.jpg? dc3cf87d18112a35f6204913825585d4 142 kB [Emitted]
    images/chat-bg.jpg? b04e814510747fb82cb17f2d2d86ad3a 64.8 kB [Emitted]
    images/complete.png? f49f5eefa47626e63221e0fc1238af64 5.9 kB [Emitted]
    /js/app.js 5.34 MB 0 [Emitted] [big] /js/app /css/app.css 937 kB 0 [Emitted] [big] /js/app

WARNING in . /Resources/Assets/pages/Advance-Elements/Moment-with-locales.min.js Module not found: Error: Can’t resolve './locale' in '/var/www/html/sistemas/frweb/crm/Resources/Assets/pages/Advance-Elements' @ . /Resources/Assets/pages/Advance-Elements/Moment-with-locales.min.js 463:20-44 @ . /Resources/js/depedencies.js @ . /Resources/js/app.js @multi . /Resources/js/app.js . /Resources/Sass/app.scss

Someone’s been through it?

1 answer

1


The simplest solution to force the webpack not to cause this error is to force it to load something different. This worked for me:

Install empty module this way:

npm install --save-dev Empty-module

And then configure Contextreplacementplugin like this:

new webpack.Contextreplacementplugin(/. /locale$/, 'Empty-module', false, /js$/)

I hope this helps.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.