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]: Invalid vnode type when creating vnode: undefined. #85

Open
zhaozhongyu opened this issue Jul 25, 2023 · 10 comments
Open

[Vue warn]: Invalid vnode type when creating vnode: undefined. #85

zhaozhongyu opened this issue Jul 25, 2023 · 10 comments

Comments

@zhaozhongyu
Copy link

helloworld.vue内容

<script setup>
  import { onMounted } from 'vue';
    onMounted(() => {
        console.log('mounted');
    })

</script>

<template>
  <div>hello world</div>
</template>

react中引用:

import { applyVueInReact, applyPureVueInReact } from 'veaury';
import helloworld from './helloworld.vue';

const HelloWorld = applyVueInReact(helloworld);

// <HelloWorld></HelloWorld>

此时控制台提示
image

界面的元素:
image

@devilwjp
Copy link
Collaborator

@zhaozhongyu 提供一个范例项目给我

@Parag2385
Copy link

@zhaozhongyu Were you able to solve this issue?

@glepka
Copy link

glepka commented May 27, 2024

I have the same issue
image

@devilwjp
how I can solve it?

@Parag2385
were you able to solve this problem?

@Parag2385
Copy link

@glepka , nope, I couldn't figure out. I ended up not using veaury. Instead, I'm developing the vue app screen by screen and using routing to run it by the side of our react app.

@devilwjp
Copy link
Collaborator

@Parag2385 @glepka Can anyone provide an example project?

@glepka
Copy link

glepka commented May 28, 2024

@Parag2385 @glepka Can anyone provide an example project?

what exactly needs to be sent?

@devilwjp
Copy link
Collaborator

devilwjp commented May 28, 2024

@Parag2385 @glepka Can anyone provide an example project?

what exactly needs to be sent?

Provide the github URL of a test project. @glepka

@glepka
Copy link

glepka commented May 29, 2024

@Parag2385 @glepka Can anyone provide an example project?

what exactly needs to be sent?

Provide the github URL of a test project. @glepka

I created a private repository and added you as a collaborator
https://github.com/glepka/vueinreact

There is a simple structure
The Vue component should appear on the "/test" route, but this does not happen

The vue component itself is located in the dist folder

@devilwjp
Copy link
Collaborator

devilwjp commented May 29, 2024

@Parag2385 @glepka Can anyone provide an example project?

what exactly needs to be sent?

Provide the github URL of a test project. @glepka

I created a private repository and added you as a collaborator https://github.com/glepka/vueinreact

There is a simple structure The Vue component should appear on the "/test" route, but this does not happen

The vue component itself is located in the dist folder

@glepka
So is this project built using create reat app? It looks like you don't have webpack.config.js configured, I think you may need to run npm run eject first.
For details on how to configure webpack, please refer to https://github.com/gloriasoft/veaury/tree/master/dev-project-react/README.md

I think the problem you're having is that your project doesn't recognize the .vue file because you didn't add veaury/webpack/VeauryVuePlugin in webpack.config.js

@devilwjp
Copy link
Collaborator

@glepka Is the problem solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants