tres
tres copied to clipboard
Nested component not rendering
Describe the bug
I'm trying to import a model in components/3D/TestModel.vue and nest it. However, it's not appearing. Only those models that are inside the app.vue or inside components itself and not the subfolder are rendered.
Reproduction
https://github.com/nulkode/tresjs-nuxt-error
Steps to reproduce
- Clone the minimum reproduction repository.
- Install all the dependencies with
bun install. - Run with
bun dev. - Observe that only two cubes are rendered, one missing in the center that is the one in
components/3D/TestModel.vue
System Info
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.15.5 - C:\Program Files\nodejs\pnpm.CMD
bun: 1.1.17 - ~\.bun\bin\bun.EXE
Browsers:
Ungoogled Chromium 124.0.6367.91 (Official Build, ungoogled-chromium) (64 bits)
I'm using bun as a package manager but it is not listed as a package manager.
Used Package Manager
npm
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a minimal reproducible example of the bug.
Hi @nulkode what happens if you add the actual import from the component? Like
import Cube from '/components/3D/TestModel.vue/
Is it rendered?
When I import it, it appears.
@nulkode seems to be related to the autoimport detection of your Nuxt app https://nuxt.com/docs/guide/concepts/auto-imports