Skip to content
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

Runtime Error: You are using the runtime-only build of Vue where the template compiler is not available. #14

Closed
theironcook opened this issue Jul 17, 2018 · 2 comments

Comments

@theironcook
Copy link

Hi,
I'm getting the following error in chrome when I try to use the vue-flash-message:

main.ts:23 [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.

found in

--->
at src\App.vue

I'm running the project in development mode with the vue-cli. It's a brand new project. I'm using Typescript.

Here are few relevant code snippets.
main.ts
import Vue from 'vue'
import VueFlashMessage from 'vue-flash-message';
Vue.use(VueFlashMessage);

App.vue

I'm pretty sure I need to use a different version of Vue than what I'm including via import Vue from 'vue' but I can't figure out how to make things work.

@theironcook
Copy link
Author

I figured it out - I needed to add runtimeCompiler: true in my vue.config.js file like this:

const vueConfig = {
runtimeCompiler: true
}

@acrolink
Copy link

@theironcook Thank you very much for sharing the solution.

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