1
votes

In my project I have following directory structure:

  • Project/

    • Library1/

      package.json

    • Dependency2/

      package.json

    package.json

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

1

1 Answers

3
votes

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/