Hello all,
I am encountering a “Cannot execute node: No such file or directory (2)” after deployment.
I followed this deployment tutorial Deploying a Meteor app on Ubuntu 14.04 LTS (with APT) on a Linux/Unix production server with Passenger Enterprise in Nginx mode - Passenger Enterprise + Meteor deployment tutorial - Passenger Library. The tutorial does not include creating an empty “public” directory inside the bundled app directory, so I created it since the passenger conf in the tutorial says to point it into a public folder e.g /var/www/todoapp/bundle/public.
Here is my /etc/nginx/sites-enabled/todoapp.conf
`server {
listen 80;
server_name todoapp.mydomain.com;
# Tell Nginx and Passenger where your app's 'public' directory is
root /var/www/todoapp/bundle/public;
# Turn on Passenger
passenger_enabled on;
passenger_friendly_error_pages on;
passenger_user arvi;
# Tell Passenger that your app is a Meteor app
passenger_app_type node;
passenger_startup_file main.js;
# Tell your app where MongoDB is
passenger_env_var MONGO_URL mongodb://localhost:27017/meteor;
# Tell your app what its root URL is
passenger_env_var ROOT_URL http://todoapp.mydomain.com;
}`
What I did:
- check node: ‘which node’
----> output: /usr/local/bin/node - check node version: ‘node -v’
----> output: v0.12.2 - check path: ‘echo $PATH’
----> output: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games - double check node: node
----> output: > (CTRL + C’d two times to quit) - start/stop nginx - same error
- update node: ‘nvm install 4.4.1’ then ‘nvm use 4.4.1’
- check node: ‘which node’
----> output: /home/arvi/.nvm/versions/node/v4.4.1/bin/node - check path: ‘echo $PATH’
----> output:
/home/arvi/.nvm/versions/node/v4.4.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games - start/stop nginx - same error
Machine: Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-48-generic x86_64)
I’ve been stuck for more than 4 hours already trying to figure out why it can’t execute node. I can’t find related articles so I decided to seek help already.
Thank you so much.