'Node Sass error in Angular: Mixins may not be defined within control directives or other mixins

I have a project written in Angular 4 and I am trying to build it, but I keep getting this error: Mixins may not be defined within control directives or other mixins.

I've looked around on the internet and I saw some recommendations to downgrade node-sass to the version 4.8.1, but when I tried to do this, I got a 404 erro from Github:

> [email protected] install c:\my-project\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node":

HTTP error 404 Not Found

And sure enough, this address: https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node doesn't exists. My guess is because there are new versions of node-sass available and the 4.8.1 was pushed back to the second page: https://github.com/sass/node-sass/releases?after=3.5.3.

I know that I am using a very old version of Angular and I have plans to upgrade it, but I don't have the time to do this now, has someone managed to solve this?



Solution 1:[1]

Download win32-x64-64_binding.node, put in the local:

C:\Users\{username}\AppData\Roaming\npm-cache\node-sass\4.8.1\

Then install again.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Elikill58