Skip to content

Production build fail with async components #2858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
victorgarciaesgi opened this issue Oct 31, 2018 · 1 comment
Closed

Production build fail with async components #2858

victorgarciaesgi opened this issue Oct 31, 2018 · 1 comment

Comments

@victorgarciaesgi
Copy link

Version

3.0.5

Node and OS info

Node 10.7.0, yarn 1.7, mac OS Mojave 10.14.1 Beta 1

Steps to reproduce

Here is the error I get when doing `yarn build``

In development mode I get no errors and I don't know where to search

Here is the error I get

Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 2)
Cannot read property 'stat' of undefined

    at toDepDetails (/Users/victorgarcia/Desktop/Work/Totem/peppy-pro-web/node_modules/cache-loader/dist/index.js:65:14)
    at arrayIterator (/Users/victorgarcia/Desktop/Work/Totem/peppy-pro-web/node_modules/neo-async/async.js:3780:9)
    at timesSync (/Users/victorgarcia/Desktop/Work/Totem/peppy-pro-web/node_modules/neo-async/async.js:2292:7)
    at Object.mapLimit (/Users/victorgarcia/Desktop/Work/Totem/peppy-pro-web/node_modules/neo-async/async.js:3775:5)
    at Array.<anonymous> (/Users/victorgarcia/Desktop/Work/Totem/peppy-pro-web/node_modules/cache-loader/dist/index.js:88:18)
    at arrayEachFunc (/Users/victorgarcia/Desktop/Work/Totem/peppy-pro-web/node_modules/neo-async/async.js:2512:19)
    at Object.parallel (/Users/victorgarcia/Desktop/Work/Totem/peppy-pro-web/node_modules/neo-async/async.js:6867:9)
    at Object.loader (/Users/victorgarcia/Desktop/Work/Totem/peppy-pro-web/node_modules/cache-loader/dist/index.js:87:9)

 @ ./src/views/Home.vue?vue&type=script&lang=ts& 1:0-367 1:383-386 1:388-752 1:388-752
 @ ./src/views/Home.vue
 @ ./src/views lazy ^\.\/.*\.vue$ namespace object
 @ ./src/router/routes.ts
 @ ./src/router/index.ts
 @ ./src/main.ts
 @ multi ./src/main.ts

My route config

# My route config

function loadView(view) {
  return () => import(/* webpackChunkName: "view-[request]" */ `@views/${view}.vue`);
}

// Liste des routes
export const routesList: MyRouteConfig[] = [
  {
    path: '/',
    name: routesNames.HOME,
    meta: {
      requiresAuth: true,
      title: 'Accueil',
    },
    component: loadView('Home'),
  },
  {
    path: '/connexion',
    name: routesNames.CONNEXION,
    meta: {
      noAuth: true,
      title: 'Connexion',
    },
    component: loadView('Connexion'),
  },
  {
    path: '/*',
    meta: {
      title: 'Page non trouvée',
    },
    component: loadView('error404'),
  },
];


### What is expected?
The production build is expected to success

### What is actually happening?
The production build fails when building async components

<!-- generated by vue-issues. DO NOT REMOVE -->
@haoqunjiang
Copy link
Member

Duplicate of #2847
Please delete your lock files and update the dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants