Skip to content

Cache restore failed with symlinks in Windows #120

@adriangodong

Description

@adriangodong

I'm working with a monorepo containing several npm packages. The root npm package.json references children npm packages using relative path. When npm ci / npm i is executed, a symlink is created for each child package to the root node_modules folder.

I cached the root node_modules folder.

The first workflow run is good, here are the steps:

  1. Cache restore miss
  2. Run npm ci
  3. Run npm build
  4. Success
  5. Cache save

The second run is no good:

  1. Cache restore hit
  2. Skip run npm ci
  3. Run npm build

This is only happening in windows-latest environment. I tried to reproduce the issue locally and found out that tar did not recreate the symlinks.

Any guidance on how to proceed?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions