error nodejs yarn project?
yeukfei02 opened this issue · comments
Donald Wu commented
npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-01-29T12_42_28_852Z-debug.log
I think this github actions didn't read yarn.lock
in project
will anyone help to make this happen?
Donald Wu commented
name: Deploy master branch
on:
push:
branches:
- main
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- name: serverless deploy
uses: serverless/github-action@master
with:
args: deploy
env:
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.MY_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MY_AWS_SECRET_ACCESS_KEY }}
ok just figure out, I need to change to this:
- run: yarn
I think the doc/readme.md need to update to make it clear...