简体   繁体   中英

laravel 6 backpack is not finding JQuery

in my

config/backpack/base.php

I have this mentionned:

// -------
// SCRIPTS
// -------

// JS files that are loaded in all pages, using Laravel's asset() helper
'scripts' => [
    // Backstrap includes jQuery, Bootstrap, CoreUI, PNotify, Popper
    'packages/backpack/base/js/bundle.js',

    // examples (everything inside the bundle, loaded from CDN)
     'https://code.jquery.com/jquery-3.4.1.min.js',
    // 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js',
     'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js',
    // 'https://unpkg.com/@coreui/coreui/dist/js/coreui.min.js',
    // 'https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js',
    // 'https://unpkg.com/sweetalert/dist/sweetalert.min.js',
    // 'https://cdnjs.cloudflare.com/ajax/libs/noty/3.1.4/noty.min.js'

    // examples (VueJS or React)
    // 'https://unpkg.com/vue@2.4.4/dist/vue.min.js',
    // 'https://unpkg.com/react@16/umd/react.production.min.js',
    // 'https://unpkg.com/react-dom@16/umd/react-dom.production.min.js',
],

But in fact when I open my login page and log to my server, I have this error

Uncaught ReferenceError: jQuery is not defined

i did refresh with those commands just in case:

php artisan cache:clear

php artisan config:cache

php artisan view:clear

But nothing changes.

For those who might have this issue, you have to do a

composer remove backpack/base

and also check if you have backpack/generators at a version above ^2.0 , which wasnt my case and was requiring backpack/base too

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM