Enrico
Enrico

Reputation: 3453

Using cache task in Azure Devops

I'm using the cache task in my Azure Devops build pipeline cause I want to cache my NPM packages so they don't have to be downloaded every time I run the build.

enter image description here

To cache the node_modules folder of my solution should I use $(System.DefaultWorkingDirectory)/node_modules or just node_modules in the path input ?

Upvotes: 0

Views: 745

Answers (1)

Jane Ma-MSFT
Jane Ma-MSFT

Reputation: 5192

If you want to cache npm's node_modules, then the value of path should be $(Pipeline.Workspace)/.npm/lib/node_modules.

You can click this document for detailed information.

Upvotes: 1

Related Questions