question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

workflow fails on Run actions/setup-node@v1

See original GitHub issue

Associated GitHub Community ticket: https://github.community/t/ci-started-to-fail-on-run-actions-setup-node-v1/131883

The customer is using CI workflow to generate NPM package. Recently, the workflow started to fail when running actions/setup-node@v1 . The customer said that they did not changed any configurations of workflow. The following is the error message:

Run actions/setup-node@v1
  with:
    node-version: 12
    registry-url: https://npm.pkg.github.com/
    scope: @ierp-ai
    always-auth: false
##[error]No such file or directory
##[debug]System.ComponentModel.Win32Exception (2): No such file or directory
##[debug]   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
##[debug]   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
##[debug]   at System.Diagnostics.Process.Start()
##[debug]   at GitHub.Runner.Sdk.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
##[debug]   at GitHub.Runner.Common.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
##[debug]   at GitHub.Runner.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
##[debug]   at GitHub.Runner.Worker.Handlers.NodeScriptActionHandler.RunAsync(ActionRunStage stage)
##[debug]   at GitHub.Runner.Worker.ActionRunner.RunAsync()
##[debug]   at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
##[debug]Finishing: Run actions/setup-node@v1

I also tested the setup-node v1 action with the similar inputs on my side, but did not reproduce the issue. The action can work fine without any errors.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
flesicekcommented, Sep 14, 2020

I resolved my failing CI with 2 changes:

  1. As @khhhum suggested, changed checkout to version 2 from version 1. -> Why there is such dependency, no idea and if you have breaking change, it must be somehow communicated

  2. There is another breaking change, originally when setting working-directory in run command, CI would change the directory and stay there for all consequent actions, now the working directory is always root so I need to rewrite the workflow -> again why there is such a breaking change without communication …

🤔

2reactions
khhhumcommented, Sep 14, 2020

upgrading to v2 of the github checkout action seems to have solved the issue for us. Would like to understand why 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I always fail when I run jobs on github actions ...
I have installed the latest version of NodeJs (v18.14.0), but it still fails to do jobs, what should I do? this is the...
Read more >
Sonarsource/sonarcloud-github-action failing with Node.js 12 ...
I have it integrated into my GitHub Actions with sonarsource/sonarcloud-github-action@master , and recently, the action has been failing saying ...
Read more >
How to setup Github Actions for Node.js project?
Hence, github actions workflow was added to the repository. In this blog, we would be talking about how to setup github actions for...
Read more >
All Actions will begin running on Node16 instead of Node12
We plan to migrate all actions to run on Node16 by Summer 2023. We will monitor the progress of the migration and listen...
Read more >
setup-node
setup -node - Set up your GitHub Actions workflow with a specific version of node.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found