Skip to content

yarn upgrade refuses to work inside a workspace. #4442

@SamirTalwar

Description

@SamirTalwar

Do you want to request a feature or report a bug?

This is a bug.

What is the current behavior?

Inside a workspace, yarn upgrade fails immediately.

If the current behavior is a bug, please provide the steps to reproduce.

Given the following structure:

stuff $ tree
.
├── node_modules
│   ├── stuff-bar -> ../packages/bar
│   └── stuff-foo -> ../packages/foo
├── package.json
├── packages
│   ├── bar
│   │   └── package.json
│   └── foo
│       └── package.json
└── yarn.lock

6 directories, 4 files

Running yarn upgrade does this:

stuff/packages/foo $ yarn upgrade
yarn upgrade v1.0.2
error No lockfile in this directory. Run `yarn install` to generate one.

What is the expected behavior?

Yarn upgrades the packages referenced in the package.json file.

Please mention your node.js, yarn and operating system version.

node.js: 8.4.0 from Nix
Yarn: 1.0.2
OS: macOS 10.12.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed-in-modernThis issue has been fixed / implemented in Yarn 2+.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions