Node.js plugin for vfox.
After installing vfox, install the plugin by running:
vfox add nodejs
You can configure the mirror by VFOX_NODEJS_MIRROR
environment variable. The default value
is https://nodejs.org/dist/
.
Node.js plugin for vfox
Home Page: https://vfox.lhan.me
License: Apache License 2.0
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]$
请教一下,这个插件怎么设置node下载的源,想修改为国内镜像源
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.