Skip to content

Yarn should automatically install node-gyp if needed #3114

Closed

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

Activity

  1. Daniel15 commented on Apr 12, 2017

    @Daniel15
    MemberAuthor

    @bestander - Looks like we do indeed need node-gyp and my original testing (where it worked fine) was wrong somehow. To me, the best solution is to run yarn global add node-gyp automatically if needed. What do you think?

    Let's get this fixed before the next RC.

  2. bestander commented on Apr 12, 2017

    @bestander
    Member
  3. Daniel15 commented on Apr 12, 2017

    @Daniel15
    MemberAuthor
  4. bestander commented on Apr 12, 2017

    @bestander
    Member
  5. Daniel15 commented on Apr 12, 2017

    @Daniel15
    MemberAuthor
  6. bestander commented on Apr 12, 2017

    @bestander
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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