Laravel Uncaught ReferenceError webpackJsonp not listed in app.js: 1

So, I get the following error on my browser console console when I test my Laravel 5.4 website:

Uncaught ReferenceError: webpackJsonp is not defined at app.js:1

Now, to be honest, I almost do not know about the web package and related ones, I just follow the instructions for compiling the assets and usually everything works ...

Anyway ... I use Laravel 5.4 and changed bootstrap3 to bootstrap4. Otherwise, everything is the same as in the default laravel setting.

my webpack.mix.jslooks like this:

mix.js('resources/assets/js/app.js', 'public/js')
.extract(['vue','tether','bootstrap'])
.sass('resources/assets/sass/app.scss', 'public/css');

my assets/js/app.js(comments are removed by default for readability)

require('./bootstrap');
Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
    el: '#app'
});

my assets/js/bootstrap.js(comments are removed by default for readability)

window._ = require('lodash');
window.$ = window.jQuery = require('jquery');
require('bootstrap');
window.Vue = require('vue');
window.axios = require('axios');
window.axios.defaults.headers.common = {
    'X-CSRF-TOKEN': window.Laravel.csrfToken,
    'X-Requested-With': 'XMLHttpRequest'
};

my main layout blade file is below

<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
<script src="/js/app.js"></script>
<script src="/js/vendor.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.7/raphael.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>

If you guys can think of something else that could be the reason, let me know and I will update the code snippets.

, , , .

+4
1

. .

, :

JavaScript, :

<script src="/js/manifest.js"></script>
<script src="/js/vendor.js"></script>
<script src="/js/app.js"></script>

manifest.js , .

+7

Source: https://habr.com/ru/post/1674406/


All Articles