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

Cannot read properties of undefined (reading 'sys') #8

Closed
5 tasks done
alvarosabu opened this issue Jun 16, 2023 · 3 comments
Closed
5 tasks done

Cannot read properties of undefined (reading 'sys') #8

alvarosabu opened this issue Jun 16, 2023 · 3 comments

Comments

@alvarosabu
Copy link
Member

Describe the bug

When Adding <TresCanvas /> component, this error is prompt

 ERROR  Internal server error: Cannot read properties of undefined (reading 'sys')                                        2:38:23 PM
  Plugin: vite:vue
  File: /Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@tresjs+nuxt@1.0.0-alpha.1_vue@3.3.4/node_modules/@tresjs/nuxt/dist/runtime/components/TresCanvas.vue
      at resolveFS (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18372:35)
      at importSourceToScope (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18397:14)
      at resolveTypeFromImport (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18393:23)
      at innerResolveTypeReference (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18299:14)                                                                     2:38:23 PM
      at resolveTypeReference (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18288:36)
      at innerResolveTypeElements (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17945:24)
      at resolveTypeElements (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17902:35)
      at resolveRuntimePropsFromType (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19312:20)
      at genRuntimePropsFromTypes (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19288:17)
      at genRuntimeProps (/Users/alvarosabu/Projects/tres/playground/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19278:18)

Reproduction

https://stackblitz.com/edit/nuxt-starter-crwkr1?file=nuxt.config.ts

Steps to reproduce

No response

System Info

System:
    OS: macOS 13.4
    CPU: (8) arm64 Apple M1 Pro
    Memory: 81.84 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.14.1 - ~/.nvm/versions/node/v18.14.1/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.1/bin/npm
  npmPackages:
    @tresjs/cientos: 2.1.4 => 2.1.4 
    @tresjs/core: ^2.1.3 => 2.1.3 
    @tresjs/nuxt: 1.0.0-alpha.1 => 1.0.0-alpha.1 
    nuxt: ^3.5.3 => 3.5.3 
    three: ^0.153.0 => 0.153.0

Used Package Manager

pnpm

Code of Conduct

@alvarosabu
Copy link
Member Author

Most probably due nuxt/nuxt#20936

@danielroe
Copy link
Member

This should work fine if you install typescript: nuxt/nuxt#20936 (comment).

This is upstream Vue behaviour rather than a bug in Nuxt.

@alvarosabu
Copy link
Member Author

Installing typescript locally does solve the issue. Thanks @danielroe

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

2 participants