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

Failed install leaves broken package #1539

Closed
joshkel opened this issue Oct 28, 2016 · 2 comments
Closed

Failed install leaves broken package #1539

joshkel opened this issue Oct 28, 2016 · 2 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@joshkel
Copy link
Contributor

joshkel commented Oct 28, 2016

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

Bug

What is the current behavior?

If running a package's install script fails, Yarn leaves the broken package on disk and fails to detect that it still has problems on subsequent runs.

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

  1. Pick a package that has a non-trivial install script and ensure that its install script will fail. (Installing phantomjs with no TMPDIR or TEMP in your environment should meet this criteria - see Installing phantomjs-prebuilt fails due to no npm_config_tmp #1538.)
  2. Run yarn to install it. Note the error.
  3. Run yarn again. It appears to work.
# Create a sample project with a problematic package.
echo '{"devDependencies":{"phantomjs":"2.1.7"}}' > package.json

# Run Yarn. It will fail.
TMPDIR= TEMP= yarn

# Run Yarn again. It will appear to work, but the package is still not properly installed.
TMPDIR= TEMP= yarn

What is the expected behavior?

Running yarn the second time should give the same error as running it the first time. (Maybe it should track which packages still need to have their install scripts run, or maybe it should delete the package directory and mark it as not installed on error.)

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

Node 4.6.1, Yarn 0.16.1, Ubuntu 14.04

@starwed
Copy link

starwed commented Jan 20, 2017

This has bitten me several times on TravisCI -- it will cache a broken build of phantomjs, since yarn reports it as working on a retry. Example here, where I get the message "Cannot read property 'pid' of undefined" due to a failure to start phantomjs.

@merceyz
Copy link
Member

merceyz commented Jan 4, 2021

Closing as fixed in v2

https://yarnpkg.com/getting-started/migration

@merceyz merceyz closed this as completed Jan 4, 2021
@merceyz merceyz added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

5 participants