Run npm install in remote server with capistrano 3

187 views Asked by At

i have a problem when i try to deploy my symfony application with in front angular.

When I run the following code on capistrano, I end up with the following error when I run the npm install :

cd /var/www/oasis/current/angular && npm install stderr: bash: line 1: npm: command not found

npm is of course installed on my remote server ! I even specified the npm path but without success.

set :default_env, { path: "PATH=$PATH:/home/oasis/.nvm/versions/node/v8.9.4/bin"}




namespace :npm do
    desc 'Run npm install (locally project)'
    task :install do
      puts "--> Installing npm install (middle) "
      on roles(:app) do
        execute "cd #{release_path}/angular && npm install"
      end  
    end
end
0

There are 0 answers