Ihar Krasnik
Ihar Krasnik

Reputation: 2589

Multiple package.json Elastic Beanstalk deployment

In my project I have following directory structure:

Locally I'm using grunt to install all dependencies, but Elastic BeanStalk only runs npm install for root package.json, so libraries dependencies will not be installed and project will fail.

I'm wondering how could I install Libary1/ and Library2/ dependencies at EC2 using some Amazon hooks (.ebextensions) or npm features without installing grunt and devdependencies there?

Thanks

Upvotes: 1

Views: 926

Answers (1)

Karén
Karén

Reputation: 225

You could use .ebextensions config for that.

For example add .ebextensions/npm_dependencies.config file to the Project folder:

commands:
    01_lib1_npm_install:
        command: npm install
        cwd: Library1/
    02_dep2_npm_install:
        command: npm install
        cwd: Dependency2/

Upvotes: 3

Related Questions