Coder Social home page Coder Social logo

Comments (5)

maitrungduc1410 avatar maitrungduc1410 commented on June 5, 2024

Found the issue, new version of action-doctl uses os.machine which is available from node 16.18, and my runner is running with old version of nodejs

So before setting up doctl I need to setup nodejs first, but it still doesnt' work:

- uses: actions/setup-node@v3
  with:
    node-version: "lts/*" # "16.18.0" also doesn't work
- name: Install doctl
  uses: digitalocean/action-doctl@v2
  with:
    token: ${{ secrets.MY_TOKEN }}
Screenshot 2023-08-28 at 5 43 41 PM

from action-doctl.

andrewsomething avatar andrewsomething commented on June 5, 2024

GitHub hosted runners currently come with Node.js 18.17.1 preinstalled.

https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-software
https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#language-and-runtime

What version of Node is installed on your runners? Node v16 is the oldest currently supported release upstream. It will be reaching end of life in September.

https://nodejs.dev/en/about/releases/

from action-doctl.

andrewsomething avatar andrewsomething commented on June 5, 2024

We've released v2.4.1 which switches to using process over os for backwards compatibility.

https://github.com/digitalocean/action-doctl/releases/tag/v2.4.1

from action-doctl.

maitrungduc1410 avatar maitrungduc1410 commented on June 5, 2024

thanks @andrewsomething for very quick action :).

Just to give you some more details about my case:

I have a VM and I'm running self hosted running using Docker for easy on scaling + I need to run docker build in runner

My Docker image is this: https://github.com/myoung34/docker-github-actions-runner

This is environment of my Docker container:

# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
# node -v
v10.19.0

As you can see, default nodejs version of the container is v10.19.0, which is old.

I have a React app which requires node 16 for yarn install (otherwise it'll failed during install)

So I've setup like this:

- uses: actions/setup-node@v3
  with:
    node-version: "16.18.0"
- run: yarn install

It works fine, but just from this morning I noticed all my production actions failed:

- uses: actions/setup-node@v3
  with:
    node-version: "16.18.0"
- run: yarn install
- name: Install doctl
  uses: digitalocean/action-doctl@v2
  with:
    token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

It kept on showing os.machine is not a function. The thing is yarn install is able to pick up node v16 but seems it's not for action-doctl

from action-doctl.

maitrungduc1410 avatar maitrungduc1410 commented on June 5, 2024

btw, I just retried my actions, they're working fine now.

Thank you

from action-doctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.