Topic: Picker dependency not found during webpack run

Ungr pro asked 6 years ago


Hello guys. So recently i migrated from pre-builded mdb.js to custom one allowing me to modify used libs. However when I run webpack i get this error.
This dependency was not found:
* picker in ./src/AppBundle/Resources/js/lib/mdbootstrap/vendor/picker-date.js
To install it, you can run: npm install --save picker
Why is it happening when there is picker.js being imported? Seems like PickerConstructor is not recognized as Picker ?
import './_intro-mdb-pro';
import './vendor/jquery.easing';
import './vendor/velocity';
// import  './vendor/chart';
// import  './vendor/wow';
import './dist/scrolling-navbar';
import './vendor/waves';
import './dist/forms-free';
import './dist/preloading';
import './dist/cards';
import './dist/character-counter';
// import  './vendor/toastr';
import './dist/smooth-scroll';
import './dist/dropdown';
import './dist/buttons';
// import  './vendor/hammer';
// import  './vendor/jquery.hammer';
// import  './dist/sidenav';
import './dist/collapsible';
// import  './vendor/jquery.easypiechart';
import './dist/range-input';
import './dist/file-input';
import './dist/material-select';
import './vendor/picker';
import './vendor/picker-date';
import './vendor/picker-time';
// import  './vendor/lightbox';
import './vendor/jquery.sticky';
import './vendor/scrollbar';
// import  './dist/chips';
import './vendor/ofi';
import './vendor/jarallax';
import './vendor/jarallax-video';
import './dist/mdb-autocomplete';
import './vendor/enhanced-modals';
// import'./vendor/addons/datatables';

Bartłomiej Malanowski staff commented 6 years ago

How do you run your script? 


Ungr pro commented 6 years ago

See the config bellow

Encore
.setOutputPath('web/build/')
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
.addEntry('app', './src/AppBundle/Resources/js/views/core.js')
.autoProvidejQuery()
.autoProvideVariables({
$: 'jquery',
jQuery: 'jquery',
'window.$': 'jquery',
'window.jQuery': 'jquery',
Waves: 'node-waves',
PhotoSwipe: 'photoswipe', // @see https://mdbootstrap.com/support/jquery/uncaught-referenceerror-photoswipe-is-not-defined/
PhotoSwipeUI_Default: 'photoswipe/src/js/ui/photoswipe-ui-default.js' // @see https://mdbootstrap.com/support/jquery/uncaught-referenceerror-photoswipe-is-not-defined/
})
.enableSourceMaps(!Encore.isProduction())
.enableVersioning()
.configureBabel(function(babelConfig) {
babelConfig.presets.push('es2017');
})
.configureUrlLoader({
fonts: {
limit: 4096
},
images: {
limit: 4096
}
})
.addPlugin(new webpack.optimize.UglifyJsPlugin)
;

Ungr pro commented 6 years ago

Then in core.js all the modules above are being imported



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: PC
  • Browser: Chrome 70
  • OS: PC
  • Provided sample code: No
  • Provided link: No