Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compile Vuejs components using AWS EB extensions?

I am having problems with installing Nodejs and further running "npm run production" on AWS Elastic Beanstalk. I am writing the configs right now and have tried multiple but they all dont allow me to install nodejs.

I tried to install node manually SSHing to the remote machine and running:
"sudo yum -y install nodejs npm --enablerepo-epel"

but it installs node v0.10 and then I am unable to run "npm run prod" (I guess that is because Laravel Homestead utilizes node v6.11 by default.

like image 394
naneri Avatar asked Jan 18 '26 15:01

naneri


1 Answers

Create a new elastic beanstalk configuration file with this:

container_commands: 01_install_gcc: command: 'yum install -y gcc-c++ make' 02_download_node: command: "curl -sL https://rpm.nodesource.com/setup_6.x | bash -E" 03_install_node: command: 'yum install -y nodejs' 04_install_node_modules: command: 'npm install --save-dev cross-env' 05_run_production: command: 'npm run production'

This works for the 64bit Amazon Linux 2017.03 v2.5.0 running PHP 7.1 Elastic Beanstalk Servers.

like image 196
Random5000 Avatar answered Jan 20 '26 06:01

Random5000



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!