-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why is it giving me a 'npx' command not found... #13
Comments
On which container are you running the job? Seems that NodeJS is missing or there is a wrong (old) version. |
facing the same issue, running on ubuntu-latest name: Deploy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
defaults:
run:
working-directory: frontend
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
- name: Deploy
uses: reggionick/s3-deploy@v3
with:
folder: build
bucket: ${{ secrets.S3_BUCKET }}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: /
delete-removed: true
no-cache: true
private: true |
/usr/local/bin/npx [email protected] ./** --bucket *** --region *** --cwd ./ --distId *** --etag --gzip xml,html,htm,js,css,ttf,otf,svg,txt --invalidate / --deleteRemoved --noCache --private |
Found the issue, it is related to the "working-directory" when i set a default directory it fail, had to specify it in each step instead |
Thanks @samehhady for the analysis. I close the issue since is not related to this action. |
@samehhady Can you share some more details? I'm facing the same issue:
|
Hi! I guess it makes sense to respect the default parameters in the action :) |
@CharlieDigital Did you ever figured this out? I'm getting the same error.
|
I'm getting the same error, im defining v3.2.0 but its reverting back to 1.40 because of a bug in the current npm version included for github actions it reverts back to the last published npm version (1.4.0 https://www.npmjs.com/package/s3-deploy) Issue in npm has since been fixed, but github actions by default still uses the broken version 8.15.0 Solution is to set the npm version yourself Hope this helps |
The text was updated successfully, but these errors were encountered: