Topic: picker.js is missing [jQuery Pro 4.8.1]

chakkit pro asked 3 years ago

Expected behavior

No errors about missing module during "npm run build".

Actual behavior

ERROR in ./src/vendors/mdb/js/mdb.js Module not found: Error: Can't resolve './picker' in 'D:\test\src\vendors\mdb\js' @ ./src/vendors/mdb/js/mdb.js 20052:4-43 @ ./src/js/app.js @ multi ./src/js/app.js ./src/scss/main.scss

Resources (screenshots, code snippets etc.)

I did install by steps below:

  1. git clone --recursive
  2. npm install
  3. download from my orders
  4. extract to src\vendors\mdb\
  5. npm run build

If I changed src/js/app.js to import mdb.lite instead of mdb, it works since mdb.lite is not required picker.js.

I checked the entire directory and cannot find picker.js, only see scss files for picker.

Piotr Glejzer staff commented 3 years ago

Hi, we are gonna check it as soon as possible. Thanks for the report.

Piotr Glejzer staff answered 3 years ago

Hi, we are very sorry about that bug, I thought we fix this but no... You have to find in mdb.js ( or in picker-date.js) :

  // AMD.
  if (typeof define == 'function' && define.amd)
    define(['./picker', 'jquery'], factory)

and change it to :

  // AMD.
  if (typeof define == 'function' && define.amd)
    define(['picker', 'jquery'], factory)

chakkit pro commented 3 years ago

It works like a charm, thanks!

Alejandro Mery free answered 3 years ago

the README of says it only works until 4.7.7 because of this reason

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes