yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.44k stars 2.72k forks source link

Yarn never finishes building fresh packages for vscode #7450

Open Neonit opened 5 years ago

Neonit commented 5 years ago

Do you want to request a feature or report a bug? I want to report a bug or ask for instructions on how to find out a problem.

What is the current behavior?

yarn install v1.17.3
$ node build/npm/preinstall.js
[1/4] Resolving packages...
[2/4] Fetching packages...
info vscode-fsevents@1.2.12: The platform "win32" is incompatible with this modu
le.
info "vscode-fsevents@1.2.12" is an optional dependency and failed compatibility
 check. Excluding it from installation.
info fsevents@1.2.7: The platform "win32" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check.
Excluding it from installation.
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check.
Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[17/17] ? windows-process-tree
[8/17] ? vscode-ripgrep
[9/17] ? vscode-sqlite3
[16/17] ? windows-mutex
[15/17] ? windows-foreground-love

The installer never finishes building fresh packages. When it starts building, I can hear my processor cooler getting louder and after a short while it becomes silent again when the console displays what I pasted above. After that point, nothing else seems to happen.

If the current behavior is a bug, please provide the steps to reproduce. I was trying to install the dependencies for building Microsoft Visual Studio Code. I used the default Windows CMD.

What is the expected behavior? The installation finishes.

If you cannot reproduce this, I would be glad to get some instructions on how I could debug this issue. I've already tried the --verbose flag and did not see any error in the end or something that looked like it could be related to my problem.

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

node -v v10.16.0

(as required by the setup instructions)

echo %PYTHON% C:\Python27\python.exe

%PYTHON% --version Python 2.7.15

GongT commented 5 years ago

I got this issue too, it seems a bug in node-gyp, which your build is already failed, but it does not quit.

you should try yarn --verbose, and search if there are some "error: "(this is c++ build output)

Neonit commented 5 years ago

As I said: I've already tried --verbose and saw no error.

I tried again now and piped the output to a file so I could search for the string error. All I found were lots of files with error in their name (before the build phase) and in the build phase two times a note on a class named Error somewhere. But no message about a compiler error or the like.

bxantus commented 4 years ago

I run in to the same issue, took me a day to find the root cause.

The bug is not in yarn itself. If you set child-concurrency config to 1, you'll see that building vscode-ripgrep is hanging.

By investigating the vscode-ripgrep package I found out that a simple npm install vscode-ripgrep in an empty folder hangs as well. vscode-ripgrep is using a postinstall script, which in turn uses PowerShell to download and unpack the binaries needed. And Powershell commands were hanging for me.

I do not know the exact root cause of the problem, but upgrading powerShell (from version 2.0 to 5.1) did the trick for me.

see this page for installation: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell?view=powershell-7

Lucasfrota commented 4 years ago

Installing node 32-bit version worked in my case

Wal1e commented 3 years ago

Installing node 32-bit version worked in my case

really? i do it ,but it did not work