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

[Vue warn]: You are using the runtime-only build of Vue... #1142

Closed
qdotm opened this issue Jul 23, 2017 · 8 comments
Closed

[Vue warn]: You are using the runtime-only build of Vue... #1142

qdotm opened this issue Jul 23, 2017 · 8 comments
Labels

Comments

@qdotm
Copy link

qdotm commented Jul 23, 2017

Hello, I am trying to use Vue-clip plugin in my Nuxt project. (http://vueclip.adonisjs.com)

This is my nuxt.config.js configuration file:

...
build: {
vendor: ['axios', 'vue-clip']
},
plugins: [
{ src: '~plugins/vue-clip.js', ssr: false }
],
...

And this is my ~plugins/vue-clip.js file:

import Vue from 'vue'
import VueClip from 'vue-clip'
Vue.use(VueClip)

This is the error I have on render:

[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.

Do you know where it could come from ?

The plugin itself has, in the webpack.config.js

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

Should I use the same alias in the nuxt.config.js file ?

Thank you very much for your help!

@pi0
Copy link
Member

pi0 commented Jul 23, 2017

Hi. While normally not recommended using compile included build, it would be possible using this configuration: (source)

    build: {
        extend(config) {
            config.resolve.alias['vue'] = 'vue/dist/vue.common'
        }
    }

@pi0 pi0 closed this as completed Jul 23, 2017
@qdotm
Copy link
Author

qdotm commented Jul 23, 2017

@pi0 thank you so much for your answer, it works!
What would you recommend instead of using the compiler included build ?

@pi0
Copy link
Member

pi0 commented Jul 23, 2017

Your welcome. That's actually packaging problem with the library which should pre-compile templates when releasing dists. That would be nice if you open an Issue/PR there mentioning this issue, I can help for fixing that if needed.

@qdotm
Copy link
Author

qdotm commented Jul 23, 2017

Thank you, just did this: thetutlage/vue-clip#37

@mhpm
Copy link

mhpm commented May 17, 2018

HELP ! , where is the file to add this
build: {
extend(config) {
config.resolve.alias['vue'] = 'vue/dist/vue.common'
}
}

mentioned by evan ?? my project is in vue cli 3

@unr
Copy link

unr commented May 25, 2018

You can read about extending your webpack config here, https://nuxtjs.org/api/configuration-build @mhpm

@mikeconstable
Copy link

mikeconstable commented Aug 31, 2018

@pi0 - thanks. I'm not using nuxtjs but your suggestion fixed a vue-d2b chart library within a Quasar-CLI project, adding a modified line to quasar.conf.js under the build section. In case it helps someone else:

build: {
scopeHoisting: true,
...
extendWebpack (cfg) {
cfg.resolve.alias['vue'] = 'vue/dist/vue.common'
cfg.module.rules.push({
...
})
}
},

Worked for me.

@lock
Copy link

lock bot commented Oct 31, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 31, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants