Skip to content

Dependency protocols

Yarn supports various protocols for defining dependencies in your application. While you’re certainly familiar with the semver protocol which downloads packages from the npm registry, Yarn is also able to retrieve packages from git, the filesystem, or even generate them on the fly.

ProtocolDescription
catalog:Delegate the dependency to the project configuration.
file:Compile a local folder into a cached archive.
file:Extract a package from a tgz archive.
git:Retrieve a package from a git repository.
link:Pretend the specified folder is a package.
npm:Download a package from the npm registry.
portal:Connect the project to a package in another folder.
workspace:Connect a workspace to another workspace.