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 install never finished #3028

Closed
ghost opened this issue Apr 1, 2017 · 27 comments
Closed

Yarn install never finished #3028

ghost opened this issue Apr 1, 2017 · 27 comments

Comments

@ghost
Copy link

ghost commented Apr 1, 2017

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

What is the current behavior?
The installation of the modules never finished. This is the log of yarn:

yarn install v0.21.3
info No lockfile found.
[1/4] Resolving packages...
warning gulp-istanbul > istanbul-threshold-checker > istanbul > fileset > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-stream > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "win32" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠂ fibers: spawn args   '-Goutput_dir=.' ]
[-/1] ⠄ waiting...
[-/1] ⠄ waiting...
[-/1] ⠄ waiting...
[-/1] ⠄ waiting...

I have waited ~20 minutes but nothing happens

If the current behavior is a bug, please provide the steps to reproduce.
I have used the following commands: yarn and yarn install on a new project (I was using npm before). Same problem in the 2 cases.

What is the expected behavior?
I expect the installation finished

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

  • Node v.7.7.2
  • Yarn 0.21.3 (installed by the msi of the yarn's website)
  • Windows 7 64 bits
@bestander
Copy link
Member

@georgesben, please provide a package.json to reproduce the issue, without it we won't be able to fix it.

@ghost
Copy link
Author

ghost commented May 4, 2017

Hi !

Sorry for the late. This is a minimal JSON for the bug:

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "chimp": "^0.48.0"
  }
}

This is quite similar with this ticket: #3041

@santiagoaguiar
Copy link

Having the same problem, the provided package.json also reproduces the issue for me. This issue probably needs to be re-opened.

@bestander bestander reopened this May 10, 2017
@santiagoaguiar
Copy link

Smaller repro case:

$ yarn init
$ yarn add fibers
yarn add v0.23.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⢀ fibers: spawn args   '-Goutput_dir=.' ]

Waits forever.

Running on windows 10, x64, node-gyp 3.6.1, node 7.9.0

@bestander
Copy link
Member

Thanks a lot.
The issue is obviously in lifecycle scripts execution phase https://github.com/yarnpkg/yarn/blob/master/src/util/execute-lifecycle-script.js#L179 and spawn command is clearly not finishing.
Anyone wants to help out and debug why it fails?

@santiagoaguiar
Copy link

santiagoaguiar commented May 10, 2017

I've spent some time trying to see why it doesn't finishes, but to no avail. The spawn is executed but, from my tests, no callback is called at all after the updateStdout call on https://github.com/yarnpkg/yarn/blob/master/src/util/child.js#L48 sends the ⢀ fibers: spawn args '-Goutput_dir=.' ]. I tried checking if some callback was throwing, but it doesn't seem to be the case either.

Strangely enough, most of the times, running a yarn install for a second time installs correctly. On my machine, 1 over 10 times the first yarn install also works OK.

There's this report: lovell/sharp#775 which is similar but with npm and on a different package. However, for me, running npm install works OK every time. I've left the yarn install running to see if it eventually finishes as reported on that bug, but it hasn't after a couple of hours ;).

Haven't found any issues running node-gyp by hand either.

I'll put some more time later to see if I can dig further.

@bestander
Copy link
Member

Thanks for more data.
I'll investigate it a bit more as well, more help is welcome

@BYK
Copy link
Member

BYK commented Jun 6, 2017

I can't reproduce this on latest master neither with Node 6 nor with Node 7. I was able to see this happen with Yarn 0.24 and Node 7 so I'd say close the issue.

If you wait long enough, the problem goes away

-Anonymous

@bestander
Copy link
Member

@BYK, did you check on windows as #3028 (comment)?

@ghost
Copy link
Author

ghost commented Jun 6, 2017

The problem is not solved for me :'(

Yarn version: 0.24.5
Node: 7.7.2

The command npm install works but yarn doesn't (waiting forever) :/
This is my logs:

yarn
yarn install v0.24.5
info No lockfile found.
[1/4] Resolving packages...
warning chimp > phantomjs-prebuilt > request > node-uuid@1.4.8: Use uuid module instead
warning chimp > xolvio-ddp > request > node-uuid@1.4.8: Use uuid module instead
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "win32" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[-/3] ⠄ waiting...
[2/3] ⠄ fibers: '-Goutput_dir=.' ]
[-/3] ⠄ waiting...
[-/3] ⠄ waiting...
[-/3] ⡀ waiting...

@BYK
Copy link
Member

BYK commented Jun 6, 2017

@bestander - not on Windows yet since I hadn't set it up and then I saw comments claiming this happened on macOS too. Will try and debug on Windows too.

@georgesben - That's great! I mean not the issue still existing but you reproducing and providing all this information. Can you also share your package.json file (or at least the relevant parts)? Looks liek you're on Windows. Which version?

@ghost
Copy link
Author

ghost commented Jun 6, 2017

I'm on Windows 7 (64 bits) Integral version

The package.json file is the following:

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "chimp": "^0.48.0"
  }
}

The command was executed in the following folder: C:\Users\USER_NAME\test

If you need more informations, please tell me :)

@BYK
Copy link
Member

BYK commented Jun 6, 2017

@georgesben - Alright. I don't have access to Win 7 (have Win 10 at home) but I'll it there. If I can't repro, I'll come back and ask for more :)

@ghost
Copy link
Author

ghost commented Jun 10, 2017

There is no lock file when I launched the command (see the third line in the log)

@BYK
Copy link
Member

BYK commented Jun 12, 2017

Hey, apologies for the radio silence. I'm in between computers right now so didn't have a chance to try and debug this on Windows yet. Still on my list.

@BYK BYK self-assigned this Jun 14, 2017
@BYK
Copy link
Member

BYK commented Jul 5, 2017

@georgesben - Is this still happening with yarn 0.27.5?

@ghost
Copy link
Author

ghost commented Jul 5, 2017

Yes, this is still happing with yarn 0.27.5 (and npm install works). Sorry ^^'

Maybe this is a problem with my computer and not with yarn ? (I suppose it works for you)

@BYK
Copy link
Member

BYK commented Jul 5, 2017

@georgesben no need to apologize! We've just shipped a few updates with 0.27 that might have resolved this issue, that's why I asked again.

You've just confirmed that I still need to debug but eliminated a possible cause so thanks!

@dbaldon
Copy link

dbaldon commented Jul 16, 2017

FYIW, I was having trouble with yarn hanging at the Linking dependencies... step also. I hit CTRL+C and this is what I got;

yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "win32" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1/936
Error: Cannot find module '../errors.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (c:\Users\xxx\Documents\GitHub\toolkit-for-ynab\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
    at _load_errors (c:\Users\xxx\Documents\GitHub\toolkit-for-ynab\node_modules\yarn\lib\cli\index.js:36:20)
    at config.init.then.catch.err (c:\Users\xxx\Documents\GitHub\toolkit-for-ynab\node_modules\yarn\lib\cli\index.js:381:34)
Terminate batch job (Y/N)? y

I then went and installed yarn via Chocolately and then reran yarn install and this time this is what I got;

yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "win32" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 10.81s.

Huge difference. I suspect the problem in my case was that yarn was not in my path. Installing it with choco install yarn put it in my path.

@BYK
Copy link
Member

BYK commented Aug 17, 2017

This seems to be resolved on latest master so closing.

@BYK BYK closed this as completed Aug 17, 2017
@entrptaher
Copy link

entrptaher commented Sep 13, 2019

Came back from 2019 :(

image

Been like this for so many minutes*.

@michaelgriffindrake
Copy link

I'm experiencing the same waiting issue as well. Let me know what info y'all would like to troubleshoot it. This is my first time using yarn so I'm not in the know as to what's occurring..

@takoberonty
Copy link

One reason why this happens is when you have not authenticated with a package server hosting one of your dependencies.

Save passphrase for ssh key
eval $(ssh-agent) ; ssh-add

@Shakespeare17
Copy link

One reason why this happens is when you have not authenticated with a package server hosting one of your dependencies.

Save passphrase for ssh key eval $(ssh-agent) ; ssh-add

Care to elaborate?

@Domigome
Copy link

Domigome commented Oct 5, 2022

I confirm that it is happening to me with the latest version as well.

@troisiemeoeil
Copy link

Still occuring to me with the latest version

@uctpermanar
Copy link

uctpermanar commented Nov 7, 2023

@bestander

This still hapenning at least with me when I install grapejs.

{
  "name": "test-dnd-web-builder",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "grapejs": "^2.1.2"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests