jeudi 22 février 2018

Error: Loading chunk 0 failed

I'm using Buefy with Laravel and have the following routes

Laravel

Route::get('/{vue?}', function () {
    return view('app');
})->where('vue', '[\/\w\.-]*')->name('app');

Then VueJS

...routes = [
  {
    path: '/', component: MainLayout,
    children: [
      {
        path: '/home',
        component: Home,
        name: 'home'
      },
      {
        path: '/login',
        name: 'login',
        component: Login,
        meta: { auth: false }
      },
      {
        path: '/collect/:id',
        name: 'collect',
        component: Collect,
        meta: { auth: false } // set to true
      }
    ]
  },
    { path: '*', component: NotFoundPage }
]

But when I type in the url /collect/123 I get

Failed to resolve async component default: Error: Loading chunk 0 failed.

Uncaught error during route navigation:

Uncaught SyntaxError: Unexpected token < manifest.js:144 Error: Loading chunk 0 failed.

    at HTMLScriptElement.onScriptComplete (manifest.js:99)
__webpack_require__.oe @ manifest.js:144
Promise.catch (async)
MainLayout @ routes.js?952c:11
(anonymous) @ vue-router.esm.js?880d:1965
(anonymous) @ vue-router.esm.js?880d:1992
(anonymous) @ vue-router.esm.js?880d:1992
flatMapComponents @ vue-router.esm.js?880d:1991
(anonymous) @ vue-router.esm.js?880d:1930
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
step @ vue-router.esm.js?880d:1622
step @ vue-router.esm.js?880d:1622
(anonymous) @ vue-router.esm.js?880d:1619
(anonymous) @ vue-router.esm.js?880d:1756
(anonymous) @ routes.js?952c:83
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
runQueue @ vue-router.esm.js?880d:1626
confirmTransition @ vue-router.esm.js?880d:1764
transitionTo @ vue-router.esm.js?880d:1666
init @ vue-router.esm.js?880d:2335
beforeCreate @ vue-router.esm.js?880d:495
callHook @ vue.common.js?e881:2558
Vue._init @ vue.common.js?e881:3998
Vue$3 @ vue.common.js?e881:4097
(anonymous) @ app.js?8b67:14
(anonymous) @ app.js:1429
__webpack_require__ @ manifest.js:53
(anonymous) @ app.js:2707
__webpack_require__ @ manifest.js:53
webpackJsonpCallback @ manifest.js:24
(anonymous) @ app.js:1
manifest.js:144 Error: Loading chunk 0 failed.
    at HTMLScriptElement.onScriptComplete (manifest.js:99)
__webpack_require__.oe @ manifest.js:144
Promise.catch (async)
Collect @ routes.js?952c:18
(anonymous) @ vue-router.esm.js?880d:1965
(anonymous) @ vue-router.esm.js?880d:1992
(anonymous) @ vue-router.esm.js?880d:1992
flatMapComponents @ vue-router.esm.js?880d:1991
(anonymous) @ vue-router.esm.js?880d:1930
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
step @ vue-router.esm.js?880d:1622
step @ vue-router.esm.js?880d:1622
(anonymous) @ vue-router.esm.js?880d:1619
(anonymous) @ vue-router.esm.js?880d:1756
(anonymous) @ routes.js?952c:83
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
runQueue @ vue-router.esm.js?880d:1626
confirmTransition @ vue-router.esm.js?880d:1764
transitionTo @ vue-router.esm.js?880d:1666
init @ vue-router.esm.js?880d:2335
beforeCreate @ vue-router.esm.js?880d:495
callHook @ vue.common.js?e881:2558
Vue._init @ vue.common.js?e881:3998
Vue$3 @ vue.common.js?e881:4097
(anonymous) @ app.js?8b67:14
(anonymous) @ app.js:1429
__webpack_require__ @ manifest.js:53
(anonymous) @ app.js:2707
__webpack_require__ @ manifest.js:53
webpackJsonpCallback @ manifest.js:24
(anonymous) @ app.js:1
vue-router.esm.js?880d:16 [vue-router] Failed to resolve async component default: Error: Loading chunk 0 failed.
warn @ vue-router.esm.js?880d:16
(anonymous) @ vue-router.esm.js?880d:1954
(anonymous) @ vue-router.esm.js?880d:2013
Promise.then (async)
(anonymous) @ vue-router.esm.js?880d:1971
(anonymous) @ vue-router.esm.js?880d:1992
(anonymous) @ vue-router.esm.js?880d:1992
flatMapComponents @ vue-router.esm.js?880d:1991
(anonymous) @ vue-router.esm.js?880d:1930
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
step @ vue-router.esm.js?880d:1622
step @ vue-router.esm.js?880d:1622
(anonymous) @ vue-router.esm.js?880d:1619
(anonymous) @ vue-router.esm.js?880d:1756
(anonymous) @ routes.js?952c:83
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
runQueue @ vue-router.esm.js?880d:1626
confirmTransition @ vue-router.esm.js?880d:1764
transitionTo @ vue-router.esm.js?880d:1666
init @ vue-router.esm.js?880d:2335
beforeCreate @ vue-router.esm.js?880d:495
callHook @ vue.common.js?e881:2558
Vue._init @ vue.common.js?e881:3998
Vue$3 @ vue.common.js?e881:4097
(anonymous) @ app.js?8b67:14
(anonymous) @ app.js:1429
__webpack_require__ @ manifest.js:53
(anonymous) @ app.js:2707
__webpack_require__ @ manifest.js:53
webpackJsonpCallback @ manifest.js:24
(anonymous) @ app.js:1
vue-router.esm.js?880d:16 [vue-router] uncaught error during route navigation:
warn @ vue-router.esm.js?880d:16
abort @ vue-router.esm.js?880d:1696
(anonymous) @ vue-router.esm.js?880d:1739
(anonymous) @ vue-router.esm.js?880d:1959
(anonymous) @ vue-router.esm.js?880d:2013
Promise.then (async)
(anonymous) @ vue-router.esm.js?880d:1971
(anonymous) @ vue-router.esm.js?880d:1992
(anonymous) @ vue-router.esm.js?880d:1992
flatMapComponents @ vue-router.esm.js?880d:1991
(anonymous) @ vue-router.esm.js?880d:1930
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
step @ vue-router.esm.js?880d:1622
step @ vue-router.esm.js?880d:1622
(anonymous) @ vue-router.esm.js?880d:1619
(anonymous) @ vue-router.esm.js?880d:1756
(anonymous) @ routes.js?952c:83
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
runQueue @ vue-router.esm.js?880d:1626
confirmTransition @ vue-router.esm.js?880d:1764
transitionTo @ vue-router.esm.js?880d:1666
init @ vue-router.esm.js?880d:2335
beforeCreate @ vue-router.esm.js?880d:495
callHook @ vue.common.js?e881:2558
Vue._init @ vue.common.js?e881:3998
Vue$3 @ vue.common.js?e881:4097
(anonymous) @ app.js?8b67:14
(anonymous) @ app.js:1429
__webpack_require__ @ manifest.js:53
(anonymous) @ app.js:2707
__webpack_require__ @ manifest.js:53
webpackJsonpCallback @ manifest.js:24
(anonymous) @ app.js:1
vue-router.esm.js?880d:1697 Error: Loading chunk 0 failed.
    at HTMLScriptElement.onScriptComplete (manifest.js:99)
abort @ vue-router.esm.js?880d:1697
(anonymous) @ vue-router.esm.js?880d:1739
(anonymous) @ vue-router.esm.js?880d:1959
(anonymous) @ vue-router.esm.js?880d:2013
Promise.then (async)
(anonymous) @ vue-router.esm.js?880d:1971
(anonymous) @ vue-router.esm.js?880d:1992
(anonymous) @ vue-router.esm.js?880d:1992
flatMapComponents @ vue-router.esm.js?880d:1991
(anonymous) @ vue-router.esm.js?880d:1930
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
step @ vue-router.esm.js?880d:1622
step @ vue-router.esm.js?880d:1622
(anonymous) @ vue-router.esm.js?880d:1619
(anonymous) @ vue-router.esm.js?880d:1756
(anonymous) @ routes.js?952c:83
iterator @ vue-router.esm.js?880d:1735
step @ vue-router.esm.js?880d:1618
runQueue @ vue-router.esm.js?880d:1626
confirmTransition @ vue-router.esm.js?880d:1764
transitionTo @ vue-router.esm.js?880d:1666
init @ vue-router.esm.js?880d:2335
beforeCreate @ vue-router.esm.js?880d:495
callHook @ vue.common.js?e881:2558
Vue._init @ vue.common.js?e881:3998
Vue$3 @ vue.common.js?e881:4097
(anonymous) @ app.js?8b67:14
(anonymous) @ app.js:1429
__webpack_require__ @ manifest.js:53
(anonymous) @ app.js:2707
__webpack_require__ @ manifest.js:53
webpackJsonpCallback @ manifest.js:24
(anonymous) @ app.js:1
vue-router.esm.js?880d:16 [vue-router] Failed to resolve async component default: Error: Loading chunk 0 failed.

I'm not sure what the error is and if its a VueJS or Laravel error. What does it mean?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2oqFXNB
via IFTTT

Aucun commentaire:

Enregistrer un commentaire