fnm icon indicating copy to clipboard operation
fnm copied to clipboard

"Requested version v20.x.x is not currently installed" when using exec

Open KyleFontenot opened this issue 5 months ago • 0 comments

user in 🌐 server in /var/www/project is 📦 v1.4.00 via 🍞 v1.1.27 via  v20.12.0 
❯ fnm list
* v18.14.2
* v20.12.0 default
* system

user in 🌐 server  in /var/www/project is 📦 v1.4.00 via 🍞 v1.1.27 via  v20.12.0 
❯ fnm use 20
Using Node v20.12.0

user in 🌐 server in /var/www/project is 📦 v1.4.00 via 🍞 v1.1.27 via  v20.12.0 
❯ /home/user/.local/share/fnm/fnm exec --using=20 node ./build/index.js 
error: Requested version v20.x.x is not currently installed

Would there be a reason why this makes sense?

My end goal is to use the equivalent of $(which node) to use in a systemd ExecStart command since the absolute path for fnm's node executable changes on restart. I don't understand why /home/user/.local/share/fnm/fnm exec --using=20 node ./build/index.js doesn't work.

KyleFontenot avatar Sep 20 '24 17:09 KyleFontenot