yarnpkg/yarn

Cannot `yarn add` in workspace package if depending on a local package

Open

#3,973 opened on Jul 20, 2017

View on GitHub
 (35 comments) (60 reactions) (0 assignees)JavaScript (41,514 stars) (2,731 forks)batch import
cat-bughelp wanted

Description

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

bug

What is the current behavior?

$ yarn add whatever
yarn add v0.27.5
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@scope%2fb: Not found".
info If you think this is a bug, please open a bug report with the information provided in "/private/tmp/yarn-issue/packages/a/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

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

git clone https://github.com/aymericbeaumet/yarn-workspace-add-package.git /tmp/yarn-issue
cd /tmp/yarn-issue/packages/a
yarn add whatever

What is the expected behavior?

  • The @scope/b should be found as it exists in the workspace
  • The package whatever should be added as a dependency of the @scope/a package

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

node 6.10.2 yarn 0.27.5 osx 10.12.5

Contributor guide