Coder Social home page Coder Social logo

setup-node-nvm's Introduction

Set up node using nvm

This action sets up a specific node.js version on GitHub Actions using nvm, very similar to @actions/setup-node. Unlike setup-node (at the time of this writing) it does support several aliases and custom mirrors like the one for node-v8. Note that this is merely intended as a placeholder until setup-node supports aliases, which is crucial for rolling testing, and mirrors, which is useful for WebAssembly testing. Has some Windows support via nvm-windows, but there are issues with versions newer than current and .nvmrc.

Inputs

node-version

The node.js version to install and use, according to nvm. Uses the version specified in .nvmrc if omitted.

node-mirror

The node.js mirror to use, e.g. https://nodejs.org/download/v8-canary/ for node on V8 lkgr.

Example usage:

uses: dcodeIO/setup-node-nvm@master
with:
  node-version: lts/*
uses: dcodeIO/setup-node-nvm@master
with:
  node-version: node
  node-mirror: https://nodejs.org/download/v8-canary/

setup-node-nvm's People

Contributors

dcodeio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

setup-node-nvm's Issues

Install version from .nvmrc

I'm new to GH actions and migrating from Travis. In Travis is .nvmrc is present that version will be used. Would it be possible to make this action respect the version in .nvmrc and omit the node-version argument?

Is it possible to specify architecture?

First of all, thanks for providing such useful action ๐Ÿ‘

This is not an issue but a question.
With nvm you can specify the architecture, i.e.:

nvm install 12.16.3 32
nvm use 12.16.3 32

Is this something you're up to support?

The action is broken since GH restricted addPath usage

The addPath method seems to be deprecated for usage and it fails the workflow

Using nvm: /home/runner/mynvm/nvm.sh
Error: Unable to process command '::add-path::/home/runner/mynvm' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Using node: /home/runner/mynvm/versions/node/v12.9.0/bin/node
Error: Unable to process command '::add-path::/home/runner/mynvm/versions/node/v12.9.0/bin' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Using npm: /home/runner/mynvm/versions/node/v12.9.0/bin/npm
Error: Unable to process command '::add-path::/home/runner/mynvm/versions/node/v12.9.0/bin' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

This action is using a deprecated action

Fist of all thank for this action. It works as expected ๐Ÿ‘

But when using it I saw the following warning from github. I guess it makes sense to solve this soon.

The `add-path` command is deprecated and will be disabled soon. 
Please upgrade to using Environment Files. For more information see: 
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

.nvmrc in a subdir

Our repo hosts the frontend and backend. The .nvmrc file resides in the frontend subdirectory. It'd be neat to have the possibility to point to a specific directory/.nvmrc file.

NVM directory already exists

Getting the following error on macOS but not ubuntu:

fatal: destination path '/Users/runner/.nvm' already exists and is not an empty directory.

I can rm -rf that directory before the iOS step, but was wondering why it is happening suddenly. To my knowledge, we didn't cache that directory.

Update to Node.js v16

Currently, when using this action with the latest runners, you get a warning:

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: dcodeIO/setup-node-nvm

See: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/

This action needs to be updated to Node.js v16

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.