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

Nuxt/Vue example repo cannot be built #9247

Open
1 task done
Sensanaty opened this issue Oct 11, 2024 · 0 comments
Open
1 task done

Nuxt/Vue example repo cannot be built #9247

Sensanaty opened this issue Oct 11, 2024 · 0 comments
Labels
area: examples Improvements or additions to examples

Comments

@Sensanaty
Copy link
Contributor

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/vercel/turborepo/tree/main/examples/with-vue-nuxt

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

2.1.4-canary.3

Describe the Bug

I'm setting up my own turborepo template and was following the examples more or less 1:1, the only differences being package names and the content of my ui and other component templates.

To test my setup so far, I tried to build it locally, and it failed on me when getting to building the ui components used in the "main" application. It failed due to a TS error, citing:

../../packages/ui/src/components/TestComponent.vue:4:23 - error TS2688: Cannot find type definition file for '.vue-global-types/vue_3.5_false.d.ts'.

4 /// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 2 errors.

 ELIFECYCLE  Command failed with exit code 1.
ERROR: "type-check" exited with 1.
 ELIFECYCLE  Command failed with exit code 1.
command finished with error: command (/Users/sensanaty/Projects/turborepo-base-template/apps/frontend) /Users/sensanaty/Library/pnpm/pnpm run build exited (1)

I couldn't find this particular error on Vue's issue tracker, so out of caution I also tried to test the example itself, because perhaps I handled something wrong.

When cloning the example folder and trying to run pnpm build in there, I get another TS error, and again this time I get greeted by a type error when building the UI components.

ld: ../../packages/ui/index.ts:1:18 - error TS7016: Could not find a declaration file for module './src/card.vue'. '/Users/l.salevic/Downloads/vercel turborepo main examples-with-vue-nuxt(1)/packages/ui/src/card.vue' implicitly has an 'any' type.
web:build:
web:build: 1 import Card from "./src/card.vue";
web:build:                    ~~~~~~~~~~~~~~~~
web:build:
web:build: ../../packages/ui/index.ts:2:22 - error TS7016: Could not find a declaration file for module './src/gradient.vue'. '/Users/l.salevic/Downloads/vercel turborepo main examples-with-vue-nuxt(1)/packages/ui/src/gradient.vue' implicitly has an 'any' type.
web:build:
web:build: 2 import Gradient from "./src/gradient.vue";
web:build:                        ~~~~~~~~~~~~~~~~~~~~
web:build:
web:build: ../../packages/ui/index.ts:3:18 - error TS7016: Could not find a declaration file for module './src/page.vue'. '/Users/l.salevic/Downloads/vercel turborepo main examples-with-vue-nuxt(1)/packages/ui/src/page.vue' implicitly has an 'any' type.
web:build:
web:build: 3 import Page from "./src/page.vue";
web:build:                    ~~~~~~~~~~~~~~~~
web:build:
web:build:
web:build: Found 3 errors in the same file, starting at: ../../packages/ui/index.ts:1
web:build:
web:build:  ELIFECYCLE  Command failed with exit code 2.
dist/index.html                  0.52 kB │ gzip:  0.33 kB
web:build: dist/assets/index-DpyiAYBp.css   5.00 kB │ gzip:  1.76 kB
web:build: dist/assets/index-DHkxuBxD.js   66.17 kB │ gzip: 25.84 kB
web:build: ✓ built in 363ms
web:build: ERROR: "type-check" exited with 2.
web:build:  ELIFECYCLE  Command failed with exit code 1.
web:build: ERROR: command finished with error: command (/Users/l.salevic/Downloads/vercel turborepo main examples-with-vue-nuxt(1)/apps/web) /Users/l.salevic/Library/pnpm/pnpm run build exited (1)
web#build: command (/Users/l.salevic/Downloads/vercel turborepo main examples-with-vue-nuxt(1)/apps/web) /Users/l.salevic/Library/pnpm/pnpm run build exited (1)

 Tasks:    0 successful, 2 total
Cached:    0 cached, 2 total
  Time:    1.687s
Failed:    web#build

 ERROR  run failed: command  exited (1)
 ELIFECYCLE  Command failed with exit code 1.

While the specific type errors are different, it's suspicious that in both cases you get type errors in the same situation (when referencing the shared UI library).

Expected Behavior

I should be able to pull the example folder and build the project locally.

To Reproduce

  1. Clone the Nuxt + Vue example folder (https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fvercel%2Fturborepo%2Ftree%2Fmain%2Fexamples%2Fwith-vue-nuxt)
  2. Run pnpm install in the root-level of the monorepo
  3. Run pnpm build

Additional context

No response

@Sensanaty Sensanaty added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Oct 11, 2024
@anthonyshew anthonyshew added area: examples Improvements or additions to examples and removed kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples
Projects
None yet
Development

No branches or pull requests

2 participants