Skip to content

Yarn should automatically install node-gyp if needed #3114

@Daniel15

Description

@Daniel15

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

What is the current behavior?
The bundled .js version of Yarn (which is now used in all the other installers) doesn't include node-gyp, resulting in errors like this:

error C:\temp\license-test\node_modules\libalac: Command failed.
Exit code: 1
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c node-gyp rebuild
Directory: C:\temp\license-test\node_modules\libalac
Output:
'node-gyp' is not recognized as an internal or external command,
operable program or batch file.

This was already an issue with the standalone .js build, but it'll be an issue with other builds now that we use the standalone .js file everywhere.

Rather than bundling node-gyp with Yarn (like we did before), we should probably run yarn global add node-gyp to install it when needed.

Repro:

yarn init
yarn add nodetunes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions