Here is a very quick blog post to give some answer to the poor SP Developer who are running on a mac, dealing with the new SharePoint Framework.
So, after updating to MacOS Sierra, you should experiments two troubles (I did) : a DNS Error (DNS_PROBE_FINISHED_NXDOMAIN), and a npm error (uid must be an unsigned int)
#1 – DNS Error during debug
It is really easy to solve this one :
- In Terminal, just type
sudo nano /etc/hosts
- Type your password
- In the text editor, add a line
So the file should be like this :
- Hit ctrl+x, then Y, then Return
- You’re all done : it works
#2 – npm error (nodeJS) when you try to install/update anything with npm
The error is typically : « uid must be an unsigned int »
This is linked to an user uid modification during the MacOS upgrade process (don’t ask me anymore). The solution was found on GitHub, with the help of Ed Pelc. Ed does not really explain how to install this very helpful utility called « n ». It allows you to change your version of node really easily.
So, go on https://github.com/tj/n, download the package like this :
Because MacOS Sierra is smart, the zip will be automatically unzipped as a folder, in the « Download » folder.
In the terminal make a
cd .. cd Downloads/n-master make install sudo n 6.2
This last command will change your version of node to a working one !
That’s it ! I will be back soon with a full tutorial about the framework jPBI.js recoded in a SharePoint Framework webpart !