-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
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/markbrockhoff/turbo-repo-bug-repro
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.0.4-canary.3
Describe the Bug
Whenever I execute a build using turborepo for the first time everything is generated correctly and cached. But when running the same build again the existing cache is restored to the wrong directory causing build files to end up in the src directory.
Expected Behavior
I'd expect turborepo to restore the build cache in the exact same location where it came from.
To Reproduce
I created a minimal reproduction using the latest version of turborepo containing only one package which is the default starter for creating a Nuxt module (That's where I encountered the issue)
To reproduce the issue do the following steps:
- Clone the repro:
git clone https://github.com/markbrockhoff/turbo-repo-bug-repro
- Install the dependencies
pnpm i
- Run a first build:
pnpm build
- Run a second build:
pnpm build
After the second build you'll see that two new files were created within /packages/nuxt-test/src/runtime. These files should be placed inside the dist folder but somehow seem to be restored into the src folder.
I think the issue has something to do with the fact that the build task depends on the dev:prepare task and both habe the dist folder as output, however it's still very strange to me that the files end up in a totally different place.
Additional context
I'm using pnpm v9.3.0 and node 20.11.0, any help with this issue would be appreciated. Thanks