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

chakkit pro asked 5 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 https://github.com/SpellCraft/mdb4-boilerplate.git
  2. npm install
  3. download MDB-Pro_4.8.1.zip from my orders
  4. extract MDB-Pro_4.8.1.zip 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 5 years ago

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


Piotr Glejzer staff answered 5 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)

https://ibb.co/N1CmCLF


chakkit pro commented 4 years ago

It works like a charm, thanks!


Alejandro Mery free answered 5 years ago


the README of https://github.com/SpellCraft/mdb4-boilerplate.git says it only works until 4.7.7 because of this reason



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: 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