Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we are using [email protected] on our fork of node-sass.
Node-sass is a wrapper around libsass, which is written in C. The bindings between Node and libsass have to be recompiled for every API change in Node (which is generally quite frequent). The node-sass installer attempts to download a binary for the current platform, Node version, and node-sass version (i.e. it has to find a binary that matches all three). Lately in xForge it has had to fall back to building the bindings from source. I noticed this because on Uma's machine the build fails. The error message isn't very clear about why, but ideally building from source should not be necessary; it should just download the binaries.
The reason it can't download the binaries is because we are using an older, forked version of node-sass (the latest version is 4.9.0; we're using 4.5.0 on our fork. The node-sass project supplies binaries for 4.5.0 that work with older versions of Node, but they don't support old versions of node-sass on newer versions of Node.
The original reason we forked node-sass was due to infinite recursion when watching CSS files. The issue still exists but is being addressed in the upcoming release of node-sass 5.0, which upgrades to either libsass 3.5 or 3.6. See sass/node-sass#2111 and sass/node-sass#2312. I can explain more of the reason for the fork if anyone is interested, but for this particular issue it's mostly not relevant.
What I've done is update our fork with version 4.9.0, reapplied the fixes I had made for 4.5.0, and updated xForge's package.json to point to the new branch on our fork.
Everything appears to be working properly.
npm install
now no longer requires compiling libsass from source, produces 11 times less output lines, and runs nearly three times faster (c. 38s rather than 115s).E2e tests are more or less passing, with a couple failures that look familiar because they've been failing lately. None appear related to updating node-sass.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)