This repository was archived by the owner on Apr 1, 2019. It is now read-only.
This repository was archived by the owner on Apr 1, 2019. It is now read-only.
Template or render function not defined #9
Closed
Description
I have exported my standalone component socomodule
and published it on npm.
When I try to use it in another Vue application, I get an error:
<template>
<div>
...
<socomodule></socomodule>
...
</div>
</template>
<script>
import Vue from 'vue'
import socomodule from 'socomodule'
Vue.component('socomodule', socomodule)
export default {
name: 'my-component'
}
</script>
[Vue warn]: Failed to mount component: template or render function not defined.
found in
---> <Socomodule>
If you want to try, npm i socomodule
Here's the (truncated) package.json
of the published module:
{
"name": "socomodule",
"main": "socomodule.min.js",
"dependencies": {
"vue": "^2.5.3"
}
}
I published the cjs folder (containing .min.js
, .min.js.map
, .min.css
, .min.css.map
).
Same problem with the UMD:
<html>
<head>
<script src="https://unpkg.com/vue" charset="utf-8"></script>
<script src="socomodule.min.js" charset="utf-8"></script>
</head>
<body>
<div id="app"><socomodule></socomodule></div>
<script type="text/javascript">
Vue.component('socomodule', window.Socomodule);
new Vue({ el: '#app' })
</script>
</body>
</html>
gets the same error:
[Vue warn]: Failed to mount component: template or render function not defined.
found in
---> <Socomodule>
If you want to try, get our release at https://github.com/socialement-competents/socomodule/releases/tag/v1.1.1
Metadata
Metadata
Assignees
Labels
No labels