MEAN AMI User Data - Node not found

I’m attempting to start up EC2 instances with the Bitnami MEAN stack AMI (bitnami-meanstack-3.2.9-0-r21-linux-ubuntu-14.04.3-x86_64-hvm-ebs-mp-7045c7ce-794f-40b1-ae20-1955a798aef6-ami-9eb4c189.3 (ami-fb156988)) and run a bit of script via the User Data to clone a git repo, run NPM install and then run that app with node. However, looking at the cloud-init-output.log I can see that the git clone and npm install are fine, but when it comes to run node (node main) it has the error:

2016-10-26 11:51:59,596 -[WARNING]: Failed running /var/lib/cloud/instan
ce/scripts/part-001 [127]```
So `node` cannot be found.  Any ideas why this might be?  Should I use a different method to achieve what I was trying to do?

Many thanks for advice.


It is not finding the command because the path is not correctly set. Could you try adding the following at the beginning of your script?

.  /opt/bitnami/scripts/

With this, the PATH variable should be correctly set.

Hope it helps.

Best regards,

Javier J. Salmerón

Is there a way you can attach the script which you had used?

Hello @simransindhwani2,

This case is really old. New cases are automatically closed, but previous cases are still open. Could you please create a new case with more information about the issue you are facing?