Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

VinayKesharwani's avatar

Accessing nvm in Laravel Forge deployment script

Hi everyone, I have installed nvm in Laravel Forge and able to change node version using nvm use command. But when I run deployment script with the same nvm command it ends with - command not found error. Same thing happens with Forge Run Command option.

Has anyone able to access the nvm command in forge app?

0 likes
1 reply
javierpoma's avatar

Try to add the following steps:

. ~/.nvm/nvm.sh nvm use 16.0.0

2 likes

Please or to participate in this conversation.