Comments (3)
@markbrockhoff Thanks for the report!
I think this is still a bug on our end as we should be removing the dist/runtime
symlink and creating a new directory instead of just placing files in it.
Now having two tasks who disagree on what a file (dist/runtime
) should be is to be avoided as running one task will effectively "undo" the other.
from turbo.
I can confirm that this is due to the overlapping outputs interacting in a very weird way. It appears that something in dev:prepare
is creating a symlink from dist/runtime -> src/runtime
:
[0 olszewski@chriss-mbp] /tmp/turbo-repo-bug-repro/packages/nuxt-test $ pnpm dev:prepare
> [email protected] dev:prepare /private/tmp/turbo-repo-bug-repro/packages/nuxt-test
> nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground
ℹ Stubbing my-module 11:30:47 AM
ℹ Cleaning dist directory: ./dist 11:30:47 AM
✔ Types generated in .nuxt 11:30:49 AM
✔ Types generated in playground/.nuxt 11:30:50 AM
[0 olszewski@chriss-mbp] /tmp/turbo-repo-bug-repro/packages/nuxt-test $ ls -lh dist
total 48
-rw-r--r-- 1 olszewski wheel 227B Jun 13 11:30 module.cjs
-rw-r--r-- 1 olszewski wheel 171B Jun 13 11:30 module.d.ts
-rw-r--r-- 1 olszewski wheel 156B Jun 13 11:30 module.json
-rw-r--r-- 1 olszewski wheel 477B Jun 13 11:30 module.mjs
lrwxr-xr-x 1 olszewski wheel 64B Jun 13 11:30 runtime -> /private/tmp/turbo-repo-bug-repro/packages/nuxt-test/src/runtime
-rw-r--r-- 1 olszewski wheel 918B Jun 13 11:30 types.d.mts
-rw-r--r-- 1 olszewski wheel 912B Jun 13 11:30 types.d.ts
This leads to the issue when we there's a cache hit for my-module#build
and we attempt to restore dist/runtime/plugin.js
and dist/runtime/plugin.d.ts
to dist/runtime
which now points to src/runtime
due to the symlink created by dev:prepare
[0 olszewski@chriss-mbp] /tmp/turbo-repo-bug-repro $ tar --use-compress-program=unzstd -tvf .turbo/cache/72cffa046a69ae97.tar.zst
-rw-r--r-- 0 0 0 1257 Dec 31 1969 packages/nuxt-test/.turbo/turbo-build.log
drwxr-xr-x 0 0 0 0 Dec 31 1969 packages/nuxt-test/dist/
-rw-r--r-- 0 0 0 227 Dec 31 1969 packages/nuxt-test/dist/module.cjs
-rw-r--r-- 0 0 0 192 Dec 31 1969 packages/nuxt-test/dist/module.d.mts
-rw-r--r-- 0 0 0 192 Dec 31 1969 packages/nuxt-test/dist/module.d.ts
-rw-r--r-- 0 0 0 156 Dec 31 1969 packages/nuxt-test/dist/module.json
-rw-r--r-- 0 0 0 415 Dec 31 1969 packages/nuxt-test/dist/module.mjs
drwxr-xr-x 0 0 0 0 Dec 31 1969 packages/nuxt-test/dist/runtime/
-rw-r--r-- 0 0 0 152 Dec 31 1969 packages/nuxt-test/dist/runtime/plugin.d.ts
-rw-r--r-- 0 0 0 141 Dec 31 1969 packages/nuxt-test/dist/runtime/plugin.js
drwxr-xr-x 0 0 0 0 Dec 31 1969 packages/nuxt-test/dist/runtime/server/
-rw-r--r-- 0 0 0 56 Dec 31 1969 packages/nuxt-test/dist/runtime/server/tsconfig.json
-rw-r--r-- 0 0 0 425 Dec 31 1969 packages/nuxt-test/dist/types.d.mts
-rw-r--r-- 0 0 0 419 Dec 31 1969 packages/nuxt-test/dist/types.d.ts
from turbo.
Ah, that makes sense that the symlik is causing the issue. Thanks for the explanation.
I was able to fix the issue inside my project by avoiding the duplicate caching of the dist folder. However I still wanted to report the strange behavior as it might also affect other people.
from turbo.
Related Issues (20)
- New UI does not display summarization HOT 1
- v2: Nuxt/Nitro cant pick up environment anymore HOT 2
- Add env wildcards for framework Nitro NITRO_* HOT 5
- [VSCode Extension] Version Mismatch HOT 1
- unable to setup tls windows 11 HOT 1
- Turborepo v2 output prints nothing when there are no errors with `"outputLogs": "errors-only"` HOT 1
- Vercel build errors with `Internal Error: EEXIST: file already exists` during package installation in repo with submodule HOT 3
- npx @turbo/codemod@latest upgrade downgrades yarn and fails HOT 1
- add example with yarn berry and docker HOT 1
- Docs: `--filter` with multiple filters should be an intersection, not a union
- Turbo saving caches in incorrect location HOT 10
- Allow disabling checking for a new version of Turborepo HOT 4
- `@turbo/codemod` does not handle Yarn 4 installations
- Turbo doesn't detect dependencies with PNPM >= 9.0.0 HOT 3
- Turbo produces an `undefined` folder HOT 3
- [VS Code Extension] Transit Nodes gives `turbo:no-such-task` error HOT 1
- Turborepo@2 is no longer playing well with vscode debug terminal HOT 6
- Docs: formatting errors inside `code` blocks in configuring turbo.json page HOT 1
- [LSP] Extension fails to resolve turbo.path in VSC HOT 1
- `@turbo/codemod` does not update `$schema` version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbo.