"Failed to mount component: template or render function not defined" when running `npm run styleguide`
See original GitHub issueI get the following errors for all my components when trying to add styleguidest to an existing repo that is imported to other projects like a library as a submodule
[Vue warn]: Failed to mount component: template or render function not defined.
found in
---> <Modal> at vue/Modal.vue
<Anonymous>
<Root>
The structure is
- - vue/
- - - - Modal.vue
- - - - OtherComponents.vue
- - scss/
- - - - Modal.scss
- - - - OtherComponents.scss
- - styleguide.config.js
- - webpack.config.js
The styleguide config looks like this
module.exports = {
title: 'Style Guide',
components: './vue/**/[A-Z]*.vue',
defaultExample: true,
webpackConfig: require('./webpack.config'),
exampleMode: 'expand'
}
and the webpack config is
const path = require('path');
module.exports = {
module: {
rules: [
{
include: [
path.resolve(__dirname, "vue")
],
exclude: /node_modules/,
loader: "vue-loader"
},
{
test: /\.js?$/,
exclude: /node_modules/,
loader: "babel-loader"
},
{
include: [
path.resolve(__dirname, "scss")
],
loader: "sass-loader"
}
]
}
};
Any thoughts why this would be happening?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Vue Failed to mount component: template or render function ...
The compiling goes fine but when I try to preview the page it gives me the following error: [Vue warn]: Failed to mount...
Read more >Failed to mount component: template or render function not ...
Any thoughts? I want load a vue file into another .vue file See example: https://gi. ... Failed to mount component: template or render...
Read more >Guide to Unit Testing Vue Components - TestDriven.io
This article serves as a guide to unit testing Vue components. We'll first look at why unit testing is important for creating maintainable ......
Read more >Vue.js Failed to mount component: template or render function ...
... Vue.js Failed to mount component: template or render function not defined ... I'm running app at localhost:3000 with browserSync and npm run...
Read more >Vue.js style guide - GitLab Docs
Do not use %template in HAML. Explicitly define data being passed into the Vue app. // bad return new Vue({ el: '#element', components:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

feel free to re-open if needed
You rock ! and thank you \o/