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.

What version of node is used in Actions to run gh-scripts?

See original GitHub issue

The documentation does not detail what version of node is used to execute, and whether actions/setup-node would of any use / relevance?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
kf6kjgcommented, May 14, 2021

The current ubuntu-latest runner is Ubuntu 20.04.2 which, according to the docs is provided with Node 14.16.1.

I set up a job with the following statements:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/setup-node@v2.1.5
        with:
          node-version: 14

      - run: |
          console.debug({nodeVersion: process.version});
        shell: node --input-type=module {0}

      - uses: actions/github-script@v4.0.2
        with:
          script: |
            console.debug({nodeVersion: process.version});

And got the following as results from the console logs:

{ nodeVersion: 'v14.16.1' }

{ nodeVersion: 'v12.13.1' }

So I’d say that this action is overriding the version supplied by both the environment AND actions/setup-node. This is very annoying as it means that code I compiled from TS to JS for ES2020 will not execute due to the usage of the nullish coalescing operator and other features introduced in 14.

Please revisit this.

1reaction
joshmgrosscommented, Feb 11, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Create Your First Node.js GitHub Action: a How-To Guide
In this post, you'll learn what GitHub Actions are and how to create your first GitHub Action for your Node.js application.
Read more >
scripts - npm Docs
The dependencies script is run any time an npm command causes changes to the node_modules directory. It is run AFTER the changes have...
Read more >
A guide to GitHub Actions using Node.js for Git workflow ...
Learn how to write GitHub actions using Node.js, including environment setup, best practices, a step-by-step guide and code snippets.
Read more >
How to Create a Custom GitHub Action with Node & JavaScript
For our custom GitHub Action, we're going to use node and ... to “run” node.js version 12; Setting our “main” entry point to...
Read more >
Setting up a Node development environment - MDN Web Docs
Node can be run on Windows, macOS, many flavors of Linux, Docker, etc. There is a full list on the Node.js Downloads page....
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