bahmutov / npm-install

GitHub Action for install npm dependencies with caching without any configuration
https://github.com/marketplace/actions/npm-or-yarn-install-with-caching
650 stars 70 forks source link

[bug] cache not work in windows #187

Open jcc1997 opened 1 year ago

jcc1997 commented 1 year ago

it give log below:

Run bahmutov/npm-install@v1
running npm-install GitHub Action
trying to restore cached NPM modules
npm cache hit undefined
installing NPM dependencies using Yarn
yarn at "C:\npm\prefix\yarn.cmd"
C:\Windows\system32\cmd.exe /D /S /C "C:\npm\prefix\yarn.cmd --frozen-lockfile"
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > babel-plugin-transform-scss@1.2.0" has unmet peer dependency "path@^0.12.[7](https://github.com/jcc1997/any-version-cep-demo/actions/runs/5582645113/jobs/10202144903#step:3:8)".
[4/4] Building fresh packages...
Done in 101.[9](https://github.com/jcc1997/any-version-cep-demo/actions/runs/5582645113/jobs/10202144903#step:3:10)0s.
saving NPM modules
saving npm cache failed with Error: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved., continuing...
all done, exiting

yml

jobs:
  build:
    runs-on: windows-latest
    env:
      CHANNEL: stage

    strategy:
      matrix:
        node-version: [18.x]
    steps:
      - uses: actions/checkout@v3
      - name: Yarn Install
        uses: bahmutov/npm-install@v1

or did I config wrong?