mykeels.com

Fixing npm rebuild node-sass

Just one of many possible errors

Fixing npm rebuild node-sass

Just one of many possible errors

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!

Related Articles

Tags