Open ibufu opened 2 months ago
Same here
The issue persists in the latest Nx version (v20.0.11). Is there any additional action planned to address this? @jaysoo @ndcunningham
Thanks!
Error: File exists (os error 17)
at /node_modules/.pnpm/nx@20.0.11/node_modules/nx/src/tasks-runner/cache.js:317:17
Just delete the scripts in package.json and only keep scripts in project.json
On Fri, 8 Nov 2024 at 1:22 PM Muhammad Alfian Rasyidin < @.***> wrote:
The issue persists in the latest Nx version (v20.0.11). Is there any additional action planned to address this? @jaysoo https://github.com/jaysoo @ndcunningham https://github.com/ndcunningham
Thanks!
Error: File exists (os error 17) at @.***/node_modules/nx/src/tasks-runner/cache.js:317:17
— Reply to this email directly, view it on GitHub https://github.com/nrwl/nx/issues/27724#issuecomment-2464214065, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC5TWOAZONARH6NVIGBKFGTZ7R7G3AVCNFSM6AAAAABNOPB2H6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRUGIYTIMBWGU . You are receiving this because you authored the thread.Message ID: @.***>
Big help, thanks! @ibufu
I'm getting the same error.
I'm trying to understand how not using package.json
scripts would help? I'm also trying to understand how to update my project.json
to actually build correctly.I went with a package.json
script for this particular library because it has a couple of steps:
"bundle": "tsx ./src/bundle.ts",
"build": "rm -rf ./dist && tsc -p tsconfig.lib.json && pnpm run bundle"
}
How would i convert that into a project.json
syntax, and how would that fix the problem? Or would it?
The root cause is that nx run the build script twice. You can use nx show to figure out it.
I've moved to this structure in my project.json
for this package:
{
"name": "workflow-bundler",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/workflow-bundler/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "nx:run-commands",
"options": {
"command": "say 'hello';rm -rf ./dist && tsc -p tsconfig.lib.json && tsx ./src/bundle.ts"
}
}
}
}
That say 'hello'
is just there so i can hear if it happens to run twice. It's now only running once. I've entirely removed the scripts section from my package.json
. However i'm still getting:
at /Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/cache.js:84:24
at _try (/Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/cache.js:397:26)
at _try (/Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/cache.js:406:26)
at async _try (/Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/cache.js:406:20)
at async _try (/Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/cache.js:406:20)
at async _try (/Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/cache.js:406:20)
at async _try (/Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/cache.js:406:20)
at async Promise.all (index 0)
at async TaskOrchestrator.postRunSteps (/Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/task-orchestrator.js:345:13)
at async TaskOrchestrator.applyFromCacheOrRunTask (/Users/cory.logan/Code/my-project/node_modules/.pnpm/nx@20.0.10_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.13__@swc+types@0.1.12_t_rpge6wb46b7rpyw5yhycwpxahy/node_modules/nx/src/tasks-runner/task-orchestrator.js:295:9)
Current Behavior
After integrating to an existed pnpm monorepo, it failed when building a next application with config
output:standalone
.Expected Behavior
GitHub Repo
https://github.com/ibufu/nx-next-standalone
Steps to Reproduce
pnpm i
nx build next-app
Nx Report
Failure Logs
Package Manager Version
pnpm@9.9.0
Operating System
Additional Information
No response