Fixing npm rebuild node-sass

Just one of many possible errors

Ikechi Michael
1 min readJul 24, 2019

I upgraded my node to 10.x.x, and npm rebuild node-sass would fail with invalid syntax for python3.

After scouring forums via google search, I learnt that the compilation process actually requires python2, which comes by default on all Macs. So, why is it seeing python3 first?

Apparently, npm has global settings config, and I had set its python key to python3, a while back.

So, npm config set python /usr/bin/python fixed it for me.

Back to work!

--

--

Ikechi Michael
Ikechi Michael

Written by Ikechi Michael

I’ve learned I don’t know anything. I've also learned that people will pay for what I know. Maybe that's why they never pay.

No responses yet