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

You are using the runtime-only build of Vue with vue2 #32

Closed
chbinghu opened this issue Nov 8, 2016 · 6 comments
Closed

You are using the runtime-only build of Vue with vue2 #32

chbinghu opened this issue Nov 8, 2016 · 6 comments

Comments

@chbinghu
Copy link

chbinghu commented Nov 8, 2016

thanks for your datepicker, and I got a problem in vue2
vue.common.js:2611[Vue warn]: You are using the runtime-only build of Vue where the template option is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
(found in component ).

I just use it in a *.vue

<template lang="pug">
Datepicker
</template>

<script>
import Datepicker from 'vuejs-datepicker'

export default {
    components  : {
        Datepicker
   }
}
</script>
@charliekassel
Copy link
Owner

charliekassel commented Jan 9, 2017

This can be resolved by adding this to your webpack config:

resolve: {
  alias: {
    vue: 'vue/dist/vue.js'
  }
}

See below:
vuejs-templates/webpack#215

@jonataswalker
Copy link

Hey @charliekassel and who doesn't use webpack? I use Rollup and runtime Vue.

@benplain
Copy link

Hi @charliekassel, I am also experiencing this error.
I already have resolve: { alias: { vue: 'vue/dist/vue.js' } } in my webpack config.
Interestingly, I am also using vue2-timepicker component without any problems. Not sure why yours is not working.

@lambertbeekhuis
Copy link

Can also be solved by using:

import Vue from 'vue/dist/vue.js';

In stead of:
import Vue from 'vue';

@you06
Copy link

you06 commented Jul 26, 2018

resolve: {
  alias: {
    'vue$': 'vue/dist/vue.js'
  }
}

This works for me. Using vue: 'vue/dist/vue.js' will cause the error This dependency was not found.

@mrcat323
Copy link

mrcat323 commented Aug 7, 2018

You can easily fix this, for example you have a main javascript file called, main.js and there instead of var Vue = require('vue'); you should do stuff like var Vue = require('./node_modules/vue/dist/vue.js'); basically it connects the Vue

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

7 participants