1

i want to create a dashboard as a component. but i always get this error in my cmd

  • "export 'default' (imported as 'DashboardLayoutComponent') was not found in '@syncfusion/ej2-vue-layouts'

does anyone know how i can fix this issue?

  • Please let us know whether this occurs with Vue 2 or Vue 3 project. For reference, a sample with Vue 3 rendering Dashboard Layout is attached in the below link. https://codesandbox.io/s/vue-template-forked-i4bt6?file=/src/App.vue Refer to the following UG link for getting started with Dashboard Layout in Vue 3. https://ej2.syncfusion.com/vue/documentation/dashboard-layout/getting-started-vue-3/ If the issue persists, please share your package.json code to proceed further with this. – keerthana Nov 19 '21 at 07:52

2 Answers2

1

According to the docs, it appears DashboardLayoutComponent is a named export, thus you must import it as such:

import { DashboardLayoutPlugin } from '@syncfuion/ej2-vue-layouts';

Note the { }.

Decade Moon
  • 32,968
  • 8
  • 81
  • 101
0

vue component should be register with default example:

import { ComponentA } from './ComponentA.vue' // if exported as normal
// import ComponentA from './ComponentA.vue' // if exported as default

export default { // component registoring with default
  components: {
    ComponentA
  },
  // code
}
Narasimhan R
  • 51
  • 1
  • 2
  • 15