Autocomplete template not working in Nuxt
Good morning,
I'm trying to use the custom template in the autocomplete (inside a Nuxt environment).
I followed the example in your documentation (you can find an example HERE) but in the console I get this error:
[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
The problems has occured from the 19.2.x version, in the 19.1.x there was not).
Thanks.
Marco
https://stackoverflow.com/questions/52249045/error-with-vue-cli-component-you-are-using-the-runtime-only-build-of-vue-where
Hi Deepak,
thanks for the reply!
The solution is to add this line in the nuxt.config.js:
But in my project I have also a syncfusion grid and the previous line causes an error on it:
TypeError: Cannot read properties of undefined (reading 'slots')
at GridComponent.eval (vue-class-component.esm-bundler.js?f8c7:256)
at GridComponent.ComponentBase.fetchChildPropValues (component-base.js?57d6:156)
at GridComponent.ComponentBase.bindProperties (component-base.js?57d6:135)
at new GridComponent (grid.component.js?c041:60)
at collectDataFromConstructor (component-decorator.js?b1ca:136)
at VueComponent.data (component-decorator.js?b1ca:99)
at getData (vue.common.dev.js?4650:4754)
at initData (vue.common.dev.js?4650:4711)
at initState (vue.common.dev.js?4650:4650)
at VueComponent.Vue._init (vue.common.dev.js?4650:5010)
I attach an empty Nuxt typescript project with only a grid and an autocomplete.
If you remove the config.resolve.alias.vue = 'vue/dist/vue.common' you will see that the grid works and the autocomplete not, if you add it instead the opposite will happen.
Thanks,
Marco
Attachment: syncfusiontest_95cf003f.zip
- Delete package.lock.json file from your application.
- Delete the node_modules in your project.
- Use latest version or ‘*’ for all the Syncfusion components in package.json file.
- Then execute npm install to install the new packages.
- 5 Replies
- 3 Participants
-
MR Marco Rizzato
- Oct 11, 2021 10:05 AM UTC
- Oct 19, 2021 12:22 PM UTC