Giter Site home page Giter Site logo

Comments (9)

pi0 avatar pi0 commented on June 19, 2024 2

Hi, @re2005. Yes, the issue with the render function should be fixed in v2.2.1. Just remove yarn.lock/package.lock.json and reinstall.

from components.

anick-xs avatar anick-xs commented on June 19, 2024

I have the same problem

from components.

For-ever21 avatar For-ever21 commented on June 19, 2024

I have the same problem

The name of the registered component is named PascalCase,not use kebab-case

from components.

subodhsj avatar subodhsj commented on June 19, 2024

I too have same problem, I tried PascalCase, kebab-case and path/prefix in nuxt config nothing worked.

it worked once when I tried this in nuxt.config.js
components: ["~/components"],

from components.

re2005 avatar re2005 commented on June 19, 2024

Temporarily fix to manually import all your global components:

import { Vue } from 'nuxt-property-decorator';

const files = require.context('../components/Globals', true, /\.vue$/);

files.keys().forEach(file => {
    const componentConfig = files(file);
    const componentName = file.split('/').pop().split('.')[0];
    Vue.component(componentName, componentConfig.default || componentConfig);
});

Add to the plugins

plugins: [
        '~/plugins/global-component-loader.js',
]

from components.

subodhsj avatar subodhsj commented on June 19, 2024

Describe the bug

Seems that the module is not working.
It runs fine on development, but when build gets an error:

ERROR render function or template not defined in component: {name} 16:56:44

at Yi (node_modules/vue-server-renderer/build.prod.js:1:67000)
at oo (node_modules/vue-server-renderer/build.prod.js:1:70873)
at no (node_modules/vue-server-renderer/build.prod.js:1:70523)
at wt.to [as renderNode] (node_modules/vue-server-renderer/build.prod.js:1:67770)
at wt.next (node_modules/vue-server-renderer/build.prod.js:1:20584)
at n (node_modules/vue-server-renderer/build.prod.js:1:18796)
at node_modules/vue-server-renderer/build.prod.js:1:68881
at to (node_modules/vue-server-renderer/build.prod.js:1:68889)
at node_modules/vue-server-renderer/build.prod.js:1:70990
at eo (node_modules/vue-server-renderer/build.prod.js:1:67480)

To Reproduce
Steps to reproduce the behavior:

npm run build
npm start

Expected behavior
Build normally and importing all components on the specified path.

are you using "@nuxt/typescript-build" in your project or <script lang="ts" in .vue file?

from components.

re2005 avatar re2005 commented on June 19, 2024

Hi @subodhsj yes I'm using that "@nuxt/typescript-build": "^2.1.0", and also nuxt-property-decorator

But mind you that was all working fine just a few days ago. The latest update is exactly a few days ago as well.

from components.

subodhsj avatar subodhsj commented on June 19, 2024

Hi @subodhsj yes I'm using that "@nuxt/typescript-build": "^2.1.0", and also nuxt-property-decorator

But mind you that was all working fine just a few days ago. The latest update is exactly a few days ago as well.

Thanks @re2005, My other project without @nuxt/typescript-build works fine and [email protected] works with typescript.

from components.

re2005 avatar re2005 commented on June 19, 2024

So @pi0 you have closed this issue, without the confirmation that by just removing @nuxt/typescript-build" the components module should works just fine ?

from components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.