Phoenix won't compile due to node-sass on Win10


I’ve been trying to get Phoenix to compile for a week now, and my sanity is slipping through my fingers. Any suggestions on getting this to compile? I’ve been able to run Phoenix on this machine previously a few years back.

mix test

Elixir 1.9.1
OTP 21
Phoenix 1.5.1
Node 12.17.0
NPM 6.14.5

I’ve tried:

npm install
npm install node-sass
npm uninstall node-sass
npm rebuild
npm rebuild node-sass

Deleting node_modules

Installing brunch

mix --no-brunch

Clearing NPM cache

Creating new projects on different drives

Running with admin rights

CMD / PowerShell / GIT

Sounds like you’ve tried all the standard things that could be going wrong on Windows; can you post an example of the error you’re getting?

I think that’s the natural outcome of living with Win10. If it wasn’t for superior performance of Powerpoint & Excel on Windows (which I have to use periodically) I’d give up on it for good.


I have the latest Phoenix running under Win 10. Webpack seems to be more or less behaving but I do recall having to fight with something to get it up and running - let us know what errors you are getting and it might jog my memory. Unfortunately I did my initial commit after it was running so don’t have a record of the change.

In short, replace node-sass with sass (dart sass), dart sass doesn’t need to rebuild anything.

In details, replace "node-sass": "xx.xx.xx" with "sass": "^1.22.10" in package.json. Then, sass-loader will use sass (dart sass) automatically.

Give it a try.


phx_new 1.5.1 doesn’t provide --no-brunch option anymore. I am wondering why your output is showing brunch related things. That’s weird.

You need to check whether your phx_new is 1.5.1, too.


Changing the dependency to be sass worked! I am beyond happy, now I can develop my favorite webframework on my main machine. Thank you!