Skip to content

Yarn (0.22.0) fails at installing gulp-sass/node-sass in offline environment #3116

@maelgrove

Description

@maelgrove

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

Bug.

What is the current behavior?

When attempting to install gulp-sass (or node-sass respectively) in an environment without internet connection (from tarballs), the installation fails because node-sass is unable to fetch the platform binding binaries from the github repo. The node-sass install script continues by attempting to build the binaries itself, but this might fail too if certain dependencies are missing (python etc.).

This behavior is not directly related to yarn itself, but with npm, one could simply copy the necessary files from https://github.com/sass/node-sass/releases into ./node_modules/node-sass/vendor/<platform>_<version> and run npm install again.

However, when running yarn install again, yarn seems to nuke the node-sass folder completely, including the manually added file.

I also attempted to set the environment variables both in .npmrc and via cmd args as described here: https://github.com/sass/node-sass#binary-configuration-parameters, however yarn seems to completely ignore both of them (installer script still attempts to connect to the interwebs etc..)

If the current behavior is a bug, please provide the steps to reproduce.

  1. Init fresh yarn project
  2. Setup yarn offline mirror as described here: https://yarnpkg.com/lang/en/docs/offline-mirror/
  3. Install node-sass (or gulp-sass)
  4. Delete ./node_modules/
  5. Disable internet connection
  6. Attempt to install packages again w/ yarn install

What is the expected behavior?

Either...

  • Yarn accepts module specific command line arguments (?)

or...

  • Yarn keeps custom changes made to ./node_modules/ when running yarn install

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

OS:        Windows 10 x64
Node.js:   6.10.2
npm:       3.10.10
yarn:      0.22.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions