Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn global add breaks offline mirror when run inside a package.json script #6687

Open
DanielSchaffer opened this issue Nov 16, 2018 · 0 comments
Assignees
Labels

Comments

@DanielSchaffer
Copy link

DanielSchaffer commented Nov 16, 2018

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

What is the current behavior?
When running a yarn global add command from a package.json script for the first time, it inexplicably deletes many of the packages stored in the offline cache, causing any subsequent offline install to fail.

If the current behavior is a bug, please provide the steps to reproduce.
Repro repo: https://github.com/DanielSchaffer/yarn-offline-global-bug
To reproduce, run yarn cache clean (to ensure simulating a new user setting up their workspace), then run yarn setup.

What is the expected behavior?
Yarn should install the global packages without affecting the local offline cache.

The correct behavior is shown by running the following steps directly at the command line:

yarn cache clean
yarn global add grunt
yarn install --offline

For some reason, yarn global add only breaks things when run in a package.json script.

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

  • Node.JS: 8.12
  • Yarn: 1.12.3
  • OS: macOS 10.13.6
@ghost ghost assigned arcanis Nov 16, 2018
@ghost ghost added the triaged label Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants