How To: Install from package.json not located in root directory

This article describes how to run npm install from a directory other than the root.

Option 1: Set the working directory

In your step, change the working_directory setting from: ${{clone_step}} to ${{clone_step}}/subdir.

Option 2: Change directory in step

In your step, add a command to change the directory:

commands:   
  - cd subdir   
  - npm install

NOTE
Apply this logic whenever you need to use subdirectories.

Working Directories