version-fox / vfox

A cross-platform and extendable version manager with support for Java, Node.js, Flutter, .Net & more
https://vfox.lhan.me
Apache License 2.0
2.87k stars 102 forks source link

[BUG]: nodejs plugins #336

Open Lucas-wdy opened 3 months ago

Lucas-wdy commented 3 months ago

Version 0.5.4 OS macOS

Describe the bug

$vfox install nodejs@latest

plugin [PreInstall] method error: /Users/wangdy/.version-fox/plugin/nodejs/hooks/pre_install.lua:13: attempt to index a non-table object(nil) with key 'version'
stack traceback:
    /Users/wangdy/.version-fox/plugin/nodejs/hooks/pre_install.lua:13: in main chunk
    [G]: ?
failed to install nodejs

Screenshots[optional] If applicable, add screenshots to help explain your problem.

Chance-fyi commented 3 months ago

Can you access this link?

Lucas-wdy commented 3 months ago

@Chance-fyi Yes, I can

Chance-fyi commented 3 months ago
  1. Try to see if you can access it from the command line
  2. Check if the environment variable VFOX_NODEJS_MIRROR is set.
  3. Check if a proxy is set
  4. Try setting a proxy for vfox
    vfox config proxy.enable true
    vfox config proxy.url http://your_host:your_port
logyxiao commented 2 months ago

同样就的问题 windows

PS C:\Users\Administrator> vfox -v
vfox version 0.5.4
PS C:\Users\Administrator> vfox install nodejs@v16.20.2
plugin [PreInstall] method error: C:\Users\Administrator\.version-fox\plugin\nodejs\hooks\pre_install.lua:23: cannot perform concat operation between string and nil
stack traceback:
        C:\Users\Administrator\.version-fox\plugin\nodejs\hooks\pre_install.lua:23: in main chunk
        [G]: ?
failed to install nodejs
aooohan commented 1 month ago

这种问题,大多都是网络不好导致的,切换一下nodejs镜像源试试。