Deploying a Node app in a subdirectory on AWS Elastic Beanstalk
up vote
0
down vote
favorite
I am currently in the process of setting up my first Elastic Beanstalk Node application and I have hit a snag.
I followed this tutorial to get a working Express application running with no view-engine (going to be using React):
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html
However, I want to move it to the /app directory so that eventually I can install a Wordpress instance in the root directory to use as a quick public facing intro to our application with a blog.
The project looks like this:
my-app
// Wordpress Files Here
/.ebextensions
/app
/bin
/client
// React Files Here
/node_modules
/public
/routes
/app.js
/package-lock.json
/package.json
With all of the Node files in the root directory, everything works as expected. When I move everything to the app directory and add this to the .ebextensions/01_nodeconfig.config file:
commands:
01_npm_install:
command: npm install
cwd: app/
I get this error on eb deploy:
2018-11-09 17:39:35 INFO Environment update is starting.
2018-11-09 17:40:15 INFO Deploying new version to instance(s).
2018-11-09 17:40:22 ERROR [Instance: i-0eedebf7a339e69ca] Command failed on instance. Return code: 1 Output: [Errno 2] No such file or directory: 'app/'.
EBExtension failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2018-11-09 17:40:23 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2018-11-09 17:40:23 ERROR Unsuccessful command execution on instance id(s) 'i-0eedebf7a339e69ca'. Aborting the operation.
2018-11-09 17:40:23 ERROR Failed to deploy application.
When I look in the log, here is what is returned:
[2018-11-09T17:40:20.819Z] INFO [26711] - [Application update app-4f25-181109_123930@15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: [Errno 2] No such file or directory: 'app/' (ElasticBeanstalk::ExternalInvocationError)
Does anyone have an idea on why it cannot find the app directory even though it is right there?
Thanks.
node.js amazon-ec2 amazon-elastic-beanstalk
add a comment |
up vote
0
down vote
favorite
I am currently in the process of setting up my first Elastic Beanstalk Node application and I have hit a snag.
I followed this tutorial to get a working Express application running with no view-engine (going to be using React):
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html
However, I want to move it to the /app directory so that eventually I can install a Wordpress instance in the root directory to use as a quick public facing intro to our application with a blog.
The project looks like this:
my-app
// Wordpress Files Here
/.ebextensions
/app
/bin
/client
// React Files Here
/node_modules
/public
/routes
/app.js
/package-lock.json
/package.json
With all of the Node files in the root directory, everything works as expected. When I move everything to the app directory and add this to the .ebextensions/01_nodeconfig.config file:
commands:
01_npm_install:
command: npm install
cwd: app/
I get this error on eb deploy:
2018-11-09 17:39:35 INFO Environment update is starting.
2018-11-09 17:40:15 INFO Deploying new version to instance(s).
2018-11-09 17:40:22 ERROR [Instance: i-0eedebf7a339e69ca] Command failed on instance. Return code: 1 Output: [Errno 2] No such file or directory: 'app/'.
EBExtension failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2018-11-09 17:40:23 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2018-11-09 17:40:23 ERROR Unsuccessful command execution on instance id(s) 'i-0eedebf7a339e69ca'. Aborting the operation.
2018-11-09 17:40:23 ERROR Failed to deploy application.
When I look in the log, here is what is returned:
[2018-11-09T17:40:20.819Z] INFO [26711] - [Application update app-4f25-181109_123930@15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: [Errno 2] No such file or directory: 'app/' (ElasticBeanstalk::ExternalInvocationError)
Does anyone have an idea on why it cannot find the app directory even though it is right there?
Thanks.
node.js amazon-ec2 amazon-elastic-beanstalk
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am currently in the process of setting up my first Elastic Beanstalk Node application and I have hit a snag.
I followed this tutorial to get a working Express application running with no view-engine (going to be using React):
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html
However, I want to move it to the /app directory so that eventually I can install a Wordpress instance in the root directory to use as a quick public facing intro to our application with a blog.
The project looks like this:
my-app
// Wordpress Files Here
/.ebextensions
/app
/bin
/client
// React Files Here
/node_modules
/public
/routes
/app.js
/package-lock.json
/package.json
With all of the Node files in the root directory, everything works as expected. When I move everything to the app directory and add this to the .ebextensions/01_nodeconfig.config file:
commands:
01_npm_install:
command: npm install
cwd: app/
I get this error on eb deploy:
2018-11-09 17:39:35 INFO Environment update is starting.
2018-11-09 17:40:15 INFO Deploying new version to instance(s).
2018-11-09 17:40:22 ERROR [Instance: i-0eedebf7a339e69ca] Command failed on instance. Return code: 1 Output: [Errno 2] No such file or directory: 'app/'.
EBExtension failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2018-11-09 17:40:23 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2018-11-09 17:40:23 ERROR Unsuccessful command execution on instance id(s) 'i-0eedebf7a339e69ca'. Aborting the operation.
2018-11-09 17:40:23 ERROR Failed to deploy application.
When I look in the log, here is what is returned:
[2018-11-09T17:40:20.819Z] INFO [26711] - [Application update app-4f25-181109_123930@15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: [Errno 2] No such file or directory: 'app/' (ElasticBeanstalk::ExternalInvocationError)
Does anyone have an idea on why it cannot find the app directory even though it is right there?
Thanks.
node.js amazon-ec2 amazon-elastic-beanstalk
I am currently in the process of setting up my first Elastic Beanstalk Node application and I have hit a snag.
I followed this tutorial to get a working Express application running with no view-engine (going to be using React):
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html
However, I want to move it to the /app directory so that eventually I can install a Wordpress instance in the root directory to use as a quick public facing intro to our application with a blog.
The project looks like this:
my-app
// Wordpress Files Here
/.ebextensions
/app
/bin
/client
// React Files Here
/node_modules
/public
/routes
/app.js
/package-lock.json
/package.json
With all of the Node files in the root directory, everything works as expected. When I move everything to the app directory and add this to the .ebextensions/01_nodeconfig.config file:
commands:
01_npm_install:
command: npm install
cwd: app/
I get this error on eb deploy:
2018-11-09 17:39:35 INFO Environment update is starting.
2018-11-09 17:40:15 INFO Deploying new version to instance(s).
2018-11-09 17:40:22 ERROR [Instance: i-0eedebf7a339e69ca] Command failed on instance. Return code: 1 Output: [Errno 2] No such file or directory: 'app/'.
EBExtension failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2018-11-09 17:40:23 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2018-11-09 17:40:23 ERROR Unsuccessful command execution on instance id(s) 'i-0eedebf7a339e69ca'. Aborting the operation.
2018-11-09 17:40:23 ERROR Failed to deploy application.
When I look in the log, here is what is returned:
[2018-11-09T17:40:20.819Z] INFO [26711] - [Application update app-4f25-181109_123930@15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: [Errno 2] No such file or directory: 'app/' (ElasticBeanstalk::ExternalInvocationError)
Does anyone have an idea on why it cannot find the app directory even though it is right there?
Thanks.
node.js amazon-ec2 amazon-elastic-beanstalk
node.js amazon-ec2 amazon-elastic-beanstalk
asked Nov 9 at 18:01
Nick B.
115
115
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231098%2fdeploying-a-node-app-in-a-subdirectory-on-aws-elastic-beanstalk%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown