You want to run npm install from a directory that is not the root directory.
Option 1: Set the working directory
- In your step, change the
Option 2: Change directory in step.
- In your step, add a command to change directory.
commands: - cd subdir - npm install
This logic can be applied for anything you need to use subdirectories for.