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

Segmentation fault on yarn add #8339

Closed
diniciacci opened this issue Sep 11, 2020 · 2 comments
Closed

Segmentation fault on yarn add #8339

diniciacci opened this issue Sep 11, 2020 · 2 comments

Comments

@diniciacci
Copy link

diniciacci commented Sep 11, 2020

Bug description

Command

yarn add <package_on_npm>#<version_that_does_not_exits>

result is

[1/4] Resolving packages...
[2/4] Fetching packages...
[#-] 1/2Segmentation fault

What is the current behavior?
The program segfaults.

What is the expected behavior?
It would be nice to know the package that caused the problem and a graceful message telling you that the specified version of the package is not available.

In particular it's impossible to know which package is causing the problem if what you have is a package.json with already all the dependencies listed in it. The problem is also present in case someone uses an "unpublish" feature in a repo.

Steps to Reproduce

mkdir yarntest
cd yarntest
yarn init
yarn add <package_on_npm>#<version_that_does_not exits>

Environment

  • Node Version:
    v12.18.1
  • Yarn v1 Version:
    1.22.5
  • OS and version:
    Linux 5.6.0-1-amd64 SMP Debian 5.6.7-1 (2020-04-29) x86_64 GNU/Linux
@diniciacci
Copy link
Author

diniciacci commented Sep 11, 2020

Digging a little more I can add a note that in the same empty repo, just doing a yarn add dijit#1.10.3 segfaults even if that version exists.

steps:

mkdir yarntest2
cd yarntest2
yarn init
yarn add dijit#1.10.3

result:

yarn add v1.22.5
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[--] 0/2Segmentation fault

The same is true if using a package.json file and yarn install:

{
    "name": "yarntest2",
    "version": "1.0.0",
    "main": "index.js",
    "license": "MIT",
    "dependencies": {
        "dijit": "1.10.3"
    }
}

@merceyz
Copy link
Member

merceyz commented Jan 2, 2021

Unable to reproduce with both v1 and v2

@merceyz merceyz closed this as completed Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants