Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Gulp Basics Compile Sass with Gulp Turn Sass into CSS, automatically

Samuel Fortunato
Samuel Fortunato
20,229 Points

gulp-sass failed to install; 404 Not Found error upon trying to get files from github

Time Elapsed 00:00:00.17
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Sam\Documents\Development\Web\Education\Treehouse\JavaScript\treehouse-gulp-basics\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Sam\\Documents\\Development\\Web\\Education\\Treehouse\\JavaScript\\treehouse-gulp-basics\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Sam\Documents\Development\Web\Education\Treehouse\JavaScript\treehouse-gulp-basics\node_modules\node-sass
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.13.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Sam\AppData\Roaming\npm-cache\_logs\2018-04-03T01_11_20_216Z-debug.log

I also have this at the top, close to where I typed the initial install command:

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node":

HTTP error 404 Not Found

Does gulp-sass not exist anymore? I went to its page on npm and GitHub, and they both work fine. I don't understand what's going on :(

3 Answers

Samuel Fortunato
Samuel Fortunato
20,229 Points

SOLVED: The issue was with the package.json file, it seems. The version of gulp-sass that it was requesting was too old. It was possibly trying to install files that don't exist anymore from GitHub?

Go to the npm page for gulp-sass (https://www.npmjs.com/package/gulp-sass) and look at the latest version (at this time of writing, it's 3.2.1). Go into the package.json file in this course's project folder. Change the gulp-sass version from whatever it is to the latest version manually, and then try to npm install.

NOTE: I just realized that this was probably happening to me because I wasn't switching to different git branches in the project like the teacher was, so I started with the "completed" package.json file that you're supposed to have at the end of the course. So, npm was trying to install an old version of gulp-sass that was around at the time of this course's creation.

So if you're like me, and it appears that you already have a completed package.json file, along with other "already completed" files, then this is probably the case for you, too? This is the only real problem I've had so far, but just be wary that this is likely the cause for this problem, and possible future ones in this course.

peichunliu
peichunliu
33,154 Points

I got the same problem. According to the common issue, I then simply remove the old version by using

npm uninstall --save-dev gulp-sass

After reinstalling the gulp-sass, everything works fine!

Mark Warren
Mark Warren
19,252 Points

peichunliu was right. Unistall gulp-sass and reinstall it. That worked for me too.