Thursday, May 12, 2016

Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

If you are wondering what I'm up to these days by setting up Node, npm in a Mac. Well I'm preparing my Mac for SharePoint development. Specifically Apps using client side libraries and scripts.

I'm trying to install Yeoman through the terminal application in Mac and ended up getting the below error.

Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

Though I use Mac, I'm a hardcore Windows user and do my development in Windows and mainly Microsoft technologies. So this error is new to me. Read quite a few blogs to find the correct method to resolve the issue and below is my finding.

Its a permissions issue in the home directory. I need to reclaim the ownership of the npm directory.

sudo chown -R ReplaceWithUserName ~/.npm

Also I need the write permission in to node_modules directory:
sudo chown -R ReplaceWithUserName /usr/local/lib/node_modules

This sorted my issue installing Yeoman.

Wednesday, May 11, 2016

Installing Node.js on OS X El Capitan

I'm new to Node.js. Currently all I know about Node is that it is an asynchronous event driven JavaScript runtime which is designed to build scalable network applications as the official Node site says. All I'm trying to do right now is to setup Node in my Mac and thought of sharing my experience with the community.

To install Node.js, you need to go to the where you can download a pre-compiled binary package which is easy to install. I'm going for version 6 with latest features.

You can install the package from the downloaded dmg file. The installation wizard will install Node.js and the npm (Node Package Manager) which is the default package manager for Node.js. Well, this 14MB downloaded file will take nearly 47MB of installation space from your machine. Completion of the installation, check whether the /usr/local/bin is added to your path. Type echo $PATH is the terminal.
As mentioned above, check the path.
Next step is to test the installation as shown below.
You can even check the version of node with the command node -v

This is my first step with Node, along way to go.

Monday, May 2, 2016

Azure Roadshow 2016

Another busy day for the MVPs and the techies. It’s the Azure Roadshow time for the year 2016. A day full of technical sessions. This is in parallel to to the Global Azure Boot Camp.







It’s always a pleasure to engage in community activities and share the knowledge with the techies. Smile