Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node-sass error when building in Docker

I have a problem with building a node project, specifically when compiling sass within a node:8.11.4 Docker container. I receive the following error:

gyp info using [email protected]
gyp info using [email protected] | linux | x64
.
.
.
In file included from ../src/binding.cpp:3:0:
../src/sass_context_wrapper.h:8:26: fatal error: sass/context.h: No such file or directory
 #include <sass/context.h>
                          ^
compilation terminated.

It appears as though the error is caused by:

Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/linux-x64-57_binding.node"

I know this isn't proxy related, I've tried downloading the file directly and I also receive a 404. I've made sure to remove my package-lock.json file prior to building, just in case it was a problem with a cross-platform version of node-sass.

Is there something I can do to remedy this?

like image 763
ThaDon Avatar asked Apr 07 '26 16:04

ThaDon


1 Answers

There is no download for x64-57 on v3.13.1, as v3.13.1 doesn't support node 8.

https://github.com/sass/node-sass/releases/tag/v3.13.1

https://github.com/sass/node-sass/issues/1932

So you can either update node-sass 4.5+ or downgrade node.js below 8

like image 124
Cody G Avatar answered Apr 10 '26 10:04

Cody G