version-fox / vfox-nodejs

Node.js plugin for vfox
https://vfox.lhan.me
Apache License 2.0
8 stars 4 forks source link

vfox install nodejs fails on Windows when using msys2 bash #8

Closed jcrben closed 6 months ago

jcrben commented 6 months ago

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: https://github.com/version-fox/vfox/issues/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 nodejs@16.20.2...
Downloading... 100% [=====================================================================================================================] (30 MB/s)
Verifying checksum f8bb35f6c08dc7bf14ac753509c06ed1a7ebf5b390cd3fbdc8f8c1aedd020ec3...
Unpacking C:\Users\ben\.version-fox\cache\nodejs\node-v16.20.2-win-x64.zip...
Install nodejs@16.20.2 success!
Please use vfox use nodejs@16.20.2 to use it.
ben@lenovo-legion dotfiles [master]$
aooohan commented 6 months ago

Thanks for feedback this that is a known issue, see version-fox/vfox#205.

We plan to fix this issue on vfox, not plugins.