tres icon indicating copy to clipboard operation
tres copied to clipboard

Nested component not rendering

Open nulkode opened this issue 1 year ago • 3 comments

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

  1. Clone the minimum reproduction repository.
  2. Install all the dependencies with bun install.
  3. Run with bun dev.
  4. Observe that only two cubes are rendered, one missing in the center that is the one in components/3D/TestModel.vue

image

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

nulkode avatar Jun 29 '24 10:06 nulkode

Hi @nulkode what happens if you add the actual import from the component? Like

import Cube from '/components/3D/TestModel.vue/

Is it rendered?

alvarosabu avatar Aug 30 '24 11:08 alvarosabu

When I import it, it appears.

nulkode avatar Aug 31 '24 08:08 nulkode

@nulkode seems to be related to the autoimport detection of your Nuxt app https://nuxt.com/docs/guide/concepts/auto-imports

alvarosabu avatar Sep 01 '24 14:09 alvarosabu