You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use Jenkins for automated builds (with Windows build agents) and sometimes encounter the following error during the build process. Upon restarting, the error typically disappears, suggesting that the issue might be due to a race condition.
Error message from console:
> nx run ghos-spoofing-engine:build--force-debug
Executing Command: dotnet "--version"
8.0.204
Executing Command: dotnet "build" "W:\my_project_root\packages\ghos-spoofing-engine\ghos-spoofing-engine.csproj" "--configuration" "Debug" "--no-dependencies" "--verbosity" "minimal"
MSBuild version 17.9.8+b34f75857 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
ghos-spoofing-engine -> W:\my_project_root\dist\packages\ghos-spoofing-engine\Ghos.External.dll
ERROR (1) when writing
EPERM: operation not permitted, rename 'W:\my_project_root\.nx\cache\project-graph.json~ab440dc1' -> 'W:\my_project_root\.nx\cache\project-graph.json'
EXEC : error : EPERM: operation not permitted, rename 'W:\my_project_root\.nx\cache\project-graph.json~ab440dc1' -> 'W:\my_project_root\.nx\cache\project-graph.json' [W:\my_project_root\packages\ghos-spoofing-engine\ghos-spoofing-engine.csproj]
at renameSync (node:fs:1040:3)
at writeCache (W:\my_project_root\node_modules\nx\src\project-graph\nx-deps-cache.js:102:39)
at buildProjectGraphUsingProjectFileMap (W:\my_project_root\node_modules\nx\src\project-graph\build-project-graph.js:71:40)
at async buildProjectGraphAndSourceMapsWithoutDaemon (W:\my_project_root\node_modules\nx\src\project-graph\project-graph.js:78:27)
at async createProjectGraphAndSourceMapsAsync (W:\my_project_root\node_modules\nx\src\project-graph\project-graph.js:136:25)
at async createProjectGraphAsync (W:\my_project_root\node_modules\nx\src\project-graph\project-graph.js:125:39)
Checking module boundaries for ghos-spoofing-engine
CONFIGURED undefined
W:\my_project_root\Directory.Build.targets(11,5): error MSB3073: The command "node ..\..\/node_modules/@nx-dotnet/core/src/tasks/check-module-boundaries.js --project-root "packages\ghos-spoofing-engine"" exited with code -1. [W:\my_project_root\packages\ghos-spoofing-engine\ghos-spoofing-engine.csproj]
Build FAILED.
EXEC : error : EPERM: operation not permitted, rename 'W:\my_project_root\.nx\cache\project-graph.json~ab440dc1' -> 'W:\my_project_root\.nx\cache\project-graph.json' [W:\my_project_root\packages\ghos-spoofing-engine\ghos-spoofing-engine.csproj]
W:\my_project_root\Directory.Build.targets(11,5): error MSB3073: The command "node ..\..\/node_modules/@nx-dotnet/core/src/tasks/check-module-boundaries.js --project-root "packages\ghos-spoofing-engine"" exited with code -1. [W:\my_project_root\packages\ghos-spoofing-engine\ghos-spoofing-engine.csproj]
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:16.96
�[31m>�[39m �[0m�[7m�[1m�[31m NX �[39m�[22m�[27m�[0m �[31mdotnet execution returned status code 1�[39m
Expected Behavior
The check-module-boundaries.js script should execute successfully without any errors, like this:
MSBuild version 17.9.8+b34f75857 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
ghos-spoofing-engine -> W:\my_project_root\dist\packages\ghos-spoofing-engine\Ghos.External.dll
Checking module boundaries for ghos-spoofing-engine
CONFIGURED undefined
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:06.86
Github Repo
No response
Steps to Reproduce
I cannot reproduce this issue consistently, but it occurs in approximately 30% of our automated builds.
The initial command in the Jenkinsfile is npx nx affected --base=develop -t test --configuration=production --exclude=ghos-browser-tests --parallel=5 that leads to run the failing nx run ghos-spoofing-engine:build--force-debug command.
The text was updated successfully, but these errors were encountered:
Today got the same issue in the same repository but with another package and file name (file-map.json):
MSBuild version 17.9.8+b34f75857 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
ghos-cli-domain -> W:\my_project\dist\packages\ghos-cli-domain\ghos-cli-domain.dll
ERROR (1) when writing
EPERM: operation not permitted, rename 'W:\my_project\.nx\cache\file-map.json~ee6cefc6' -> 'W:\my_project\.nx\cache\file-map.json'
EXEC : error : EPERM: operation not permitted, rename 'W:\my_project\.nx\cache\file-map.json~ee6cefc6' -> 'W:\my_project\.nx\cache\file-map.json' [W:\my_project\packages\ghos-cli-domain\ghos-cli-domain.csproj]
at renameSync (node:fs:1040:3)
at writeCache (W:\my_project\node_modules\nx\src\project-graph\nx-deps-cache.js:104:39)
at buildProjectGraphUsingProjectFileMap (W:\my_project\node_modules\nx\src\project-graph\build-project-graph.js:71:40)
at async buildProjectGraphAndSourceMapsWithoutDaemon (W:\my_project\node_modules\nx\src\project-graph\project-graph.js:78:27)
at async createProjectGraphAndSourceMapsAsync (W:\my_project\node_modules\nx\src\project-graph\project-graph.js:136:25)
at async createProjectGraphAsync (W:\my_project\node_modules\nx\src\project-graph\project-graph.js:125:39)
Checking module boundaries for ghos-cli-domain
CONFIGURED undefined
W:\my_project\Directory.Build.targets(11,5): error MSB3073: The command "node ..\..\/node_modules/@nx-dotnet/core/src/tasks/check-module-boundaries.js --project-root "packages\ghos-cli-domain"" exited with code -1. [W:\my_project\packages\ghos-cli-domain\ghos-cli-domain.csproj]
Current Behavior
We use Jenkins for automated builds (with Windows build agents) and sometimes encounter the following error during the build process. Upon restarting, the error typically disappears, suggesting that the issue might be due to a race condition.
Error message from console:
Expected Behavior
The check-module-boundaries.js script should execute successfully without any errors, like this:
Github Repo
No response
Steps to Reproduce
I cannot reproduce this issue consistently, but it occurs in approximately 30% of our automated builds.
Nx Report
nx.json
Failure Logs
No response
Additional Information
I believe the issue comes from this specific call:
nx-dotnet/packages/core/src/tasks/check-module-boundaries.ts
Line 179 in a8561e2
The initial command in the Jenkinsfile is
npx nx affected --base=develop -t test --configuration=production --exclude=ghos-browser-tests --parallel=5
that leads to run the failingnx run ghos-spoofing-engine:build--force-debug
command.The text was updated successfully, but these errors were encountered: