For anyone struggling with the Node Setup action step, specifically with the uses section when your project is in a sub-folder, you need to add a cache-dependency-path to the with section.
To add to this, if your package.lock.json is in another directory, this would most probably mean that you need to target npm build command to that particular directory by adding the default-directory syntax on your steps or job (depending on your setup)
For anyone struggling with the Node Setup action step, specifically with the
usessection when your project is in a sub-folder, you need to add acache-dependency-pathto thewithsection.Example:
To add to this, if your package.lock.json is in another directory, this would most probably mean that you need to target npm build command to that particular directory by adding the
default-directorysyntax on your steps or job (depending on your setup)npm:
runs-on: windows-latest
defaults:
run:
working-directory: ./subdir/
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: ./subdir/package-lock.json
your solution in addition to the article was helpful