Yarn: Yarn install never finished

Created on 1 Apr 2017  ยท  23Comments  ยท  Source: yarnpkg/yarn

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 > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-stream > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > [email protected]: 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 [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" 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
high-priority os-windows triaged

Most helpful comment

Came back from 2019 :(

image

Been like this for so many minutes*.

All 23 comments

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

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

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

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

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?

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: https://github.com/lovell/sharp/issues/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.

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

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_

@BYK, did you check on windows as https://github.com/yarnpkg/yarn/issues/3028#issuecomment-300499214?

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 install v0.24.5
info No lockfile found.
[1/4] Resolving packages...
warning chimp > phantomjs-prebuilt > request > [email protected]: Use uuid module instead
warning chimp > xolvio-ddp > request > [email protected]: Use uuid module instead
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" 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...

@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?

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 :)

@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 :)

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

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.

@georgesben - Is this still happening with yarn 0.27.5?

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)

@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!

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 [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" 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 [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" 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.

This seems to be resolved on latest master so closing.

Came back from 2019 :(

image

Been like this for so many minutes*.

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..

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

esphen picture esphen  ยท  3Comments

sebmck picture sebmck  ยท  3Comments

jviotti picture jviotti  ยท  3Comments

chiedo picture chiedo  ยท  3Comments

ocolot picture ocolot  ยท  3Comments