99 with :
1010 node-version-file : .nvmrc
1111
12- - name : Restore dependencies
13- id : yarn-cache
12+ # Create a minimal .yarnrc.yml without any plugin references
13+ - name : Create minimal Yarn config
14+ run : |
15+ cat > .yarnrc.yml << EOF
16+ nodeLinker: node-modules
17+ nmHoistingLimits: workspaces
18+ EOF
19+ shell : bash
20+
21+ # Setup Corepack for proper Yarn version management
22+ - name : Setup Corepack and Yarn
23+ run : |
24+ corepack enable
25+ corepack prepare yarn@4.9.2 --activate
26+ yarn --version
27+ shell : bash
28+
29+ - name : Configure Yarn and Generate .yarnrc.yml
30+ run : |
31+ yarn set version 4.9.2
32+ yarn config set nodeLinker node-modules
33+ yarn config set nmHoistingLimits workspaces
34+ shell : bash
35+
36+ - name : Verify .yarnrc.yml
37+ run : |
38+ cat .yarnrc.yml
39+ shell : bash
40+
41+ - name : Restore Yarn Cache
1442 uses : actions/cache/restore@v4
43+ id : yarn-cache
1544 with :
1645 path : |
1746 **/node_modules
47+ .yarn/cache
48+ .yarn/unplugged
1849 .yarn/install-state.gz
1950 key : ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
2051 restore-keys : |
2152 ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
2253 ${{ runner.os }}-yarn-
2354
2455 - name : Install dependencies
25- if : steps.yarn-cache.outputs.cache-hit != 'true'
26- run : |
27- yarn install --cwd example --frozen-lockfile
28- yarn install --frozen-lockfile
56+ run : yarn install
2957 shell : bash
3058
31- - name : Cache dependencies
32- if : steps.yarn-cache.outputs.cache-hit != 'true'
59+ - name : Save Yarn Cache
3360 uses : actions/cache/save@v4
61+ if : steps.yarn-cache.outputs.cache-hit != 'true'
3462 with :
3563 path : |
3664 **/node_modules
65+ .yarn/cache
66+ .yarn/unplugged
3767 .yarn/install-state.gz
38- key : ${{ steps.yarn-cache.outputs.cache-primary-key }}
68+ key : ${{ steps.yarn-cache.outputs.cache-primary-key }}
0 commit comments