Git Product home page Git Product logo

vfox-nodejs's Introduction

vfox-nodejs

Node.js plugin for vfox.

Install

After installing vfox, install the plugin by running:

vfox add nodejs

Mirror

You can configure the mirror by VFOX_NODEJS_MIRROR environment variable. The default value is https://nodejs.org/dist/.

vfox-nodejs's People

Contributors

aooohan avatar bytemain avatar ahai-code avatar

Stargazers

 avatar Nero Blackstone​ avatar smh000809 avatar zjw57 avatar  avatar Takuya Fukuju avatar

Watchers

 avatar janbar avatar  avatar

Forkers

ahai-code jan-bar

vfox-nodejs's Issues

vfox install nodejs fails on Windows when using msys2 bash

I installed vfox via scoop: scoop install vfox. A prior issue on the vfox main repo discusses more about my vfox environment, which uses msy2 bash: version-fox/vfox#172

As shown below, vfox install nodejs failed with this message:

Please use `vfox install nodejs@<version>` to install the version you need.
plugin [PreInstall] method error: C:\Users\ben\.version-fox\plugin\nodejs\hooks\pre_install.lua:23: cannot perform concat operation between string and nil
stack traceback:
        C:\Users\ben\.version-fox\plugin\nodejs\hooks\pre_install.lua:23: in main chunk
        [G]: ?

Maybe it was supposed to fail and you have to specify a version? I think some spacing and tweak to the wording could help then.

ben@lenovo-legion dotfiles [master]$ vfox install nodejs
[nodejs] not added yet, confirm that you want to use [nodejs]?
Please confirm [y/N]: Yes
Fetching plugin manifest...
Downloading https://github.com/version-fox/vfox-nodejs/releases/download/v0.2.2/vfox-nodejs-0.2.2.zip...
Validating C:\Users\ben\.version-fox\plugin\vfox-nodejs-0.2.2.zip ...
Plugin info:
Name     -> nodejs
Version  -> 0.2.2
Homepage -> https://github.com/version-fox/vfox-nodejs
Desc     -> Node.js runtime environment.
Add nodejs plugin successfully!
Please use `vfox install nodejs@<version>` to install the version you need.
plugin [PreInstall] method error: C:\Users\ben\.version-fox\plugin\nodejs\hooks\pre_install.lua:23: cannot perform concat operation between string and nil
stack traceback:
        C:\Users\ben\.version-fox\plugin\nodejs\hooks\pre_install.lua:23: in main chunk
        [G]: ?
ben@lenovo-legion dotfiles [master]$ vfox add nodejs
plugin nodejs already exists
ben@lenovo-legion dotfiles [master]$ vfox install nodejs
plugin [PreInstall] method error: C:\Users\ben\.version-fox\plugin\nodejs\hooks\pre_install.lua:23: cannot perform concat operation between string and nil
stack traceback:
        C:\Users\ben\.version-fox\plugin\nodejs\hooks\pre_install.lua:23: in main chunk
        [G]: ?
ben@lenovo-legion dotfiles [master]$ vfox install nodejs@16
Preinstalling [email protected]...
Downloading... 100% [=====================================================================================================================] (30 MB/s)
Verifying checksum f8bb35f6c08dc7bf14ac753509c06ed1a7ebf5b390cd3fbdc8f8c1aedd020ec3...
Unpacking C:\Users\ben\.version-fox\cache\nodejs\node-v16.20.2-win-x64.zip...
Install [email protected] success!
Please use vfox use [email protected] to use it.
ben@lenovo-legion dotfiles [master]$

vfox use nodejs@<version> doesn't switch versions with msys2 windows

It switches versions on a successful install, but not from vfox use command.

Activation: [[ $(command -v vfox) ]] && eval "$(vfox activate bash)"

ben@lenovo-legion ~$ echo $BASH_VERSION
5.2.26(1)-release
ben@lenovo-legion ~$ vfox install nodejs@20
Preinstalling [email protected]...
Downloading... 100% [=====================================================================================================================] (38 MB/s)
Verifying checksum 66dda1717cae30a13be6bb17ad96ee54b69f2c23c85acd9c3299b095fa26b452...
Unpacking C:\Users\ben\.version-fox\cache\nodejs\node-v20.12.2-win-x64.zip...
Install [email protected] success!
Please use vfox use [email protected] to use it.
ben@lenovo-legion ~$ node --version
v20.12.2
ben@lenovo-legion ~$ vfox use nodejs@22
Now using [email protected].
ben@lenovo-legion ~$ node --version
v20.12.2
ben@lenovo-legion ~$ vfox install nodejs@22
[email protected] is already installed
failed to install nodejs
ben@lenovo-legion ~$ vfox uninstall nodejs@22
nodejs@22 is not installed
ben@lenovo-legion ~$ vfox uninstall [email protected]
Uninstalled [email protected] successfully!
ben@lenovo-legion ~$ vfox install nodejs@22
Preinstalling [email protected]...
Downloading... 100% [=====================================================================================================================] (20 MB/s)
Verifying checksum 4b0f90bc3f1f41df16f9022ecded0c4eff55f8c3ece66ba348275c69fea4eb8e...
Unpacking C:\Users\ben\.version-fox\cache\nodejs\node-v22.1.0-win-x64.zip...
Install [email protected] success!
Please use vfox use [email protected] to use it.
ben@lenovo-legion ~$ vfox list
All installed sdk versions
├─┬java
│ └──v21.0.2+13
└─┬nodejs
  ├──v22.1.0
  └──v20.12.2

ben@lenovo-legion ~$ vfox use v22.1.0
v22.1.0 not supported, error: v22.1.0 not installed
ben@lenovo-legion ~$ vfox use nodejs v22.1.0
Please select a version of nodejs:
  -> 22.1.0
Now using [email protected].
ben@lenovo-legion ~$ vfox use nodejs v20.12.0
Please select a version of nodejs:
  -> 20.12.2
Now using [email protected].
ben@lenovo-legion ~$ node --version
v20.12.2
ben@lenovo-legion ~$ vfox use nodejs v22.1.0
Please select a version of nodejs:
  -> 22.1.0
Now using [email protected].
ben@lenovo-legion ~$ node --version
v20.12.2

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.