vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.39k stars 1.84k forks source link

Svelte Kit example cannot import ui from internal package #2241

Closed errorcodezero closed 2 years ago

errorcodezero commented 2 years ago

What version of Turborepo are you using?

latest

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

pnpm

What operating system are you using?

Linux

Describe the Bug

When I use the svelte kit example from turborepo, it breaks since it can't import the local package packages/ui.

Expected Behavior

It should just work and import the local ui package.

To Reproduce

  1. npx degit vercel/turborepo/examples/with-svelte with-svelte
  2. cd with-svelte
  3. pnpm install
  4. pnpm run build
tknickman commented 2 years ago

The svelte example won't work with pnpm out of the box. You'll need to add a pnpm workspaces file, and adjust the workspace dependencies as described in the docs here: https://pnpm.io/workspaces#workspace-protocol-workspace.

Alternatively, you can get this example up and running without any modifications using npm or yarn. Or, if you're looking for a pnpm starter you can use https://github.com/vercel/turborepo/tree/main/examples/with-pnpm.

We definitely want to make this easier so any example can be easily used with any package manager in the future!

errorcodezero commented 2 years ago

Alright thank you for the clarification. Makes a lot more sense.