Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Neeraj1005's avatar

DropDown Error for Logout

In Laravel Project, If I use bootstrap 4.3.1 Then dropdown button doesn't work. How can I resolve this? This is my bootstrap link and script tag

    <link rel="stylesheet" href="{{asset('admin/bootstrap/css/bootstrap.min.css')}}">
    <script src="{{ asset('admin/plugin/jquery/jquery.min.js') }}"></script>
    <script src="{{ asset('admin/bootstrap/js/bootstrap.min.js') }}"></script>
0 likes
9 replies
ismaile's avatar

Bootstrap components might require Popper also. You can add the following script after jQuery:

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
Neeraj1005's avatar

@nakov This type of error I get

GET http://127.0.0.1:8000/js/app.js net::ERR_ABORTED 404 (Not Found)
2home:1 Unchecked runtime.lastError: The message port closed before a response was received.
home:20 GET http://127.0.0.1:8000/css/app.css net::ERR_ABORTED 404 (Not Found)
home:24 GET http://127.0.0.1:8000/admin/plugin/jquery/jquery.slim.min.js net::ERR_ABORTED 404 (Not Found)
util.js:55 Uncaught TypeError: Cannot read property 'fn' of undefined
    at util.js:55
    at bootstrap.min.js:6
    at bootstrap.min.js:6
Nakov's avatar

@neeraj1005 have you compiled your assets? Do you have app.js under public/js/ directory?

If not then why do you load it on the page?

Neeraj1005's avatar

@nakov No I don't have app.js under public/app directory. So, What should I do next?

Nakov's avatar

@neeraj1005 you should compile the assets using npm run dev or npm run prod. Or just remove the script from the layout if you are not using it at the moment.

Neeraj1005's avatar

@nakov After running this npm run dev I caught this type or error

office@DESKTOP-2I1K25L MINGW64 /c/xampp/htdocs/CMS
$ npm run dev

> @ dev C:\xampp\htdocs\CMS
> npm run development


> @ development C:\xampp\htdocs\CMS
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

'cross-env' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\office\AppData\Roaming\npm-cache\_logs19-11-19T10_11_56_871Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\office\AppData\Roaming\npm-cache\_logs19-11-19T10_11_56_931Z-debug.log

Please or to participate in this conversation.