setup-node with cache: 'npm' fails because the template ships without package-lock.json. README documents the path to switch to 'npm ci' once the downstream repo has a lock file.
This commit is contained in:
@@ -16,10 +16,12 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
# No `cache: 'npm'` here — the template ships without a lock file.
|
||||
# Once your downstream repo has a package-lock.json from `npm install`,
|
||||
# add `cache: 'npm'` back and switch the install step to `npm ci`.
|
||||
|
||||
- name: Install
|
||||
run: npm ci
|
||||
- name: Install (use ci once lock file exists)
|
||||
run: npm install
|
||||
|
||||
- name: Prisma generate (validates schema)
|
||||
run: npx prisma generate
|
||||
|
||||
Reference in New Issue
Block a user