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
In various forms, this has plagued CI builds for at least months, but now I could pinpoint it better, after increasing dotnet build verbosity to minimal in Lombiq/Open-Source-Orchard-Core-Extensions#932. We get this randomly during Windows, but possibly sometimes also Ubuntu, builds:
2025-01-28T22:28:31.7782564Z no-path(1,1): error 1: Command failed: pnpm build [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.UIKit\Lombiq.UIKit\Lombiq.UIKit.csproj]
2025-01-28T22:28:31.7784235Z
2025-01-28T22:28:31.7784625Z 'pnpm' is not recognized as an internal or external command,
2025-01-28T22:28:31.7785120Z
2025-01-28T22:28:31.7785383Z operable program or batch file.
2025-01-28T22:28:31.7785791Z Executing "pnpm build"...
2025-01-28T22:28:31.7786120Z
2025-01-28T22:28:31.7787467Z EXECWITHMUTEX : error : Command failed: pnpm build [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.UIKit\Lombiq.UIKit\Lombiq.UIKit.csproj]
2025-01-28T22:28:31.7788859Z 'pnpm' is not recognized as an internal or external command,
2025-01-28T22:28:31.7789317Z operable program or batch file.
2025-01-28T22:28:31.7789639Z
2025-01-28T22:28:31.7790287Z at ChildProcess.exithandler (node:child_process:422:12)
2025-01-28T22:28:31.7791142Z at ChildProcess.emit (node:events:517:28)
2025-01-28T22:28:31.7791625Z at maybeClose (node:internal/child_process:1098:16)
2025-01-28T22:28:31.7792251Z at ChildProcess._handle.onexit (node:internal/child_process:303:5)
2025-01-28T22:28:31.7796995Z C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Utilities\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions\build\_NpmDotnetPrebuild.Windows.targets(4,5): error MSB3073: The command "node scripts/run-pnpm-script "C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.UIKit\Lombiq.UIKit" build" exited with code 1. [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.UIKit\Lombiq.UIKit\Lombiq.UIKit.csproj]
It seems that EnablePnpm target, that's supposed to enable PNPM and thus make the pnpm command available everywhere, is not reliably run before anything that tries to use it.
github-actionsbot
changed the title
Random "'pnpm' is not recognized as an internal or external command" issues in CI workflows
Random "'pnpm' is not recognized as an internal or external command" issues in CI workflows (OSOE-980)
Jan 29, 2025
As far back as I can see, EnablePnpm always had IgnoreExitCode="true" (currently here) to "Ignore sporadic errors when this is run by multiple threads at the same time", whatever that means. My guess is whenever the error code is ignored is exactly when pnpm doesn't get enabled, since both happen sporadically. Instead of ignoring the exit code for the target, it should be retried several times until success. Or some kind of locking/synchronization should be implemented.
That looks like the issue, and having synchronization looks like the solution. This seems to run before every new build of an NE-using project, so I'd expect it to run at "random" (based on the current dependency tree of the projects in the solution, and the performance of the build machine) times during the build. So, indeed, what may happen is that
Looking at the binary log, attached below, all EnablePnpms have this output, and nothing else:
This is correct, but doesn't tell if the activation was successful, since that's in the exit code. So again, what you suggest looks like a good solution, or at least a way to get to a concrete error during PNPM enable.
In various forms, this has plagued CI builds for at least months, but now I could pinpoint it better, after increasing
dotnet build
verbosity tominimal
in Lombiq/Open-Source-Orchard-Core-Extensions#932. We get this randomly during Windows, but possibly sometimes also Ubuntu, builds:For an example, see the https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/actions/runs/13020677548/attempts/1 build.
I don't think it's only the UI Kit project.
It seems that
EnablePnpm
target, that's supposed to enable PNPM and thus make thepnpm
command available everywhere, is not reliably run before anything that tries to use it.Lombiq/Orchard-Vue.js#162 might be related.
Jira issue
The text was updated successfully, but these errors were encountered: