Compile Error with No Error Message



  • I just started using Quasar v0.16. When I try to run dev server I got a compile message of “ERROR Failed to compile with 1 errors” but there is no actual error message.

    How can I get the actual error message?

    See it here: https://screencast.com/t/H6cAgpWG8



  • I don’t know why but apparently the error message was omitted for at (@) symbol for the load function that I defined in “routes.js”. When I removed @/ it compiles fine and generates other error messages. If you know why it is the case please let me know. The problematic line is the first one:

    const load = (component) => { return () => import(`@/${component}.vue`) }
    
    export default [
      {
        path: '',
        component: () => load('layouts/default'),
        children: [
          { path: '', component: () => import('pages/index') }
        ]
      },
    
      { // Always leave this as last one
        path: '*',
        component: () => import('pages/404')
      }
    ]
    


  • That looks like routing used for 0.14.x. In 0.15.x and up it looks like this:

    export default [
      {
        path: '/',
        component: () => import('layouts/default'),
        children: [
          {
            path: '',
            name: 'home',
            component: () => import('pages/index')
          },
          {
            path: 'events',
            name: 'events',
            component: () => import('pages/Events'),
            meta: {
              requiresAuth: true,
              permissions: ['alarmsArchiveEvents']
            }
          },
          {
            path: 'settings-system',
            name: 'settings-system',
            component: () => import('pages/SettingsSystem'),
            meta: {
              requiresAuth: true,
              permissions: ['settings']
            }
          },
          {
            path: 'settings-users',
            name: 'settings-users',
            component: () => import('pages/SettingsUsers'),
            meta: {
              requiresAuth: true,
              permissions: ['administrator']
            }
          },
          {
            path: 'settings-sites',
            name: 'settings-sites',
            component: () => import('pages/SettingsSites'),
            meta: {
              requiresAuth: true,
              permissions: ['administrator']
            }
          },
          {
            path: 'about',
            name: 'about',
            component: () => import('pages/About')
          },
          {
            path: 'help',
            name: 'help',
            component: () => import('pages/Help')
          },
          {
            path: 'sign-in',
            name: 'sign-in',
            component: () => import('pages/SignIn')
          },
          {
            path: 'not-authorized',
            name: 'not-authorized',
            component: () => import('pages/401')
          },
          {
            // Always leave this as last one
            path: '*',
            name: 'not-found',
            component: () => import('pages/404')
          }
        ]
      },
    
      { // Always leave this as last one
        path: '*',
        component: () => import('pages/404')
      }
    ]