question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

importing into a component?

See original GitHub issue

hey there

I know you can call this script externally and can add to a Vue.use but what about use case scenario where you want to import your component in a single component only like below?

this method seems to return: Failed to mount component: template or render function not defined. found in —> <ImageUploader>

import ImageUploader from 'vue-image-upload-resize'

export default {
    components:{
        ImageUploader 
    }
}
</script>

is there a way of getting around this?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
svalecommented, Jan 27, 2020

An old and closed issue, but finally fixed in #34. Also see comment.

1reaction
bbughcommented, Oct 18, 2019

If anyone else ends up here trying to problem solve after upgrading to 2.x from 1.x, you have to:

  1. Register the library as a plugin now (no individual imports)
  2. Remove any imports of the component and registration via components: { ImageUploader }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing and Exporting Components - React Docs
Make a new JS file to put the components in. · Export your function component from that file (using either default or named...
Read more >
Importing a Component | Create React App
You can configure your application to support importing modules using absolute paths. This can be done by configuring a jsconfig.json or ...
Read more >
Importing Components in React From Other Files - Upmostly
By the end of this article, you'll know how to import class components and functional components in React as well as understand a...
Read more >
How to import and export components using React + ES6 + ...
import React from 'react'; import ReactDOM from 'react-dom'; import MyNavbar from './comp/my-navbar.jsx'; export class MyPage extends React.
Read more >
Import Components from another file in React | bobbyhadz
Import Components from another file in React # · Export the component from file A , e.g. export function Button() {} . ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found