datepicker is not a function bootstrap-datepicker Symfony, webpack

  bootstrap-datepicker, jquery, symfony, webpack

I am stuck with following issue:
I have installed bootstrap-datepicker :

 "dependencies": {
    "bootstrap": "^4.4.1",
    "bootstrap-datepicker": "^1.9.0",
    "fontawesome": "^5.6.3",
    "jquery": "3.4.1",
    "popper": "^1.0.1"

My webpack.config:

.addEntry('datepicker', [

datepicker.js :

    // js

// css

$(document).ready(function () { // you may need to change this code if you are not using Bootstrap Datepicker
    $('.js-datepicker').datepicker({format: 'yyyy-mm-dd'});

And app.js

const $ = require('jquery');
// this "modifies" the jquery module: adding behavior to it
// the bootstrap module doesn't export/return anything

// any CSS you import will output into a single css file (app.css in this case)
import '../css/global.scss';
import '../css/foundation/_app.scss';
import '../css/foundation/_hero.scss';
import '../css/foundation/_minimal.scss';
import '../css/foundation/_tooltips.scss';
import '../css/foundation/_rating.scss';

I don’t know what’s going wrong, google doesn’t say much about it except the jquery version that is used by different modules is inconsistent.
When i create an alias for jquery in my webpack, I don’t get the error message anymore but nothing happens while clicking on the following field

     ->add('startDate', DateType::class, [
                'widget' => 'single_text',

                // prevents rendering it as type="date", to avoid HTML5 date pickers
                'html5' => false,

                // adds a class that can be selected in JavaScript
                'attr' => ['class' => 'js-datepicker'],

Thanks a lot for your help.

Source: Symfony Questions