MEAN.io on Ubuntu 14.04

14 October 2014

I recently tried to get MEAN running on Ubuntu 14.04 and I ran into problems. Here are the issues that I ran into, what I did wrong to respond to the errors, and how you can easily resolve the problems.

The MEAN site gives the following "2 minute" installation process instructions. For me at least, they completely failed.

Starting with the first line (installing MEAN), there was an error. To resolve this, all I had to do was update npm and retry.

Initializing the application and moving into the folder was no problem. But, when I went to install the dependencies, I got another error.

When something is locked or there is a permissions error and I feel that it is safe to do so, I try using sudo. Doing so appeared to work. But, when I ran grunt, it was still not working.

I later found out that bower has an issue when running as root. So, I could not run it under sudo and I was back to the "Attempt to unlock" error.

This time, I tried to delete my folder and try again using the advice in this post. But, it too failed.

In the end, it turned out to be that the folder simply did not exist and bower was not creating it.

Conclusions

Use the following commands when installing MEAN on Ubuntu 14.04 and starting a new project.
{"cc_re__cc_re__cc_by_4_0": ["g MEAN on Ubuntu 14.04 and starting a new project.</p>\n\n<figure class=\"highlight\"><pre><code class=\"language-shell\" data-lang=\"shell\"><span></span>$ sudo npm install -g meanio@latest\n$ mean init myApp                  \n$ <span class=\"nb\">cd</span> myApp\n$ mkdir node_modules\n$ npm install   \n$ grunt    </code></pre></figure>\n\n  </div>\n  <hr>\n  <div class=\"row\">\n    <div class=\"large-9 columns\">\n      <div class='copyright'>\n        'MEAN.io on Ubuntu 14.04'<br />is licensed under a&nbsp;\n        <a href='https://creativecommons.org/licenses/by/4.0/'>Creative Commons Attribution 4.0 International License</a><br/>\n        <img align=\"left\" src=\"/content/images/creative-commons.png\" style=\"margin: 4px 0px 4px 0px;vertical-align: middle;\">\n      </div>\n    </div>\n    <div class=\"large-3 columns\">\n      <ul class=\"share-buttons\" align=\"right\">\n        <li>\n          <a href=\"https://www.facebook.com/sharer/sharer.php?u=http://jeffbelback.me/posts/2014/10/14/meanio-ubuntu14-04/\" title=\"Share on Facebook\" target=\"_blank\">\n            <img alt=\"Sha"], "copyright__copyright__copyright": ["n I ran grunt, it was still not working.\n\nI later found out that bower has an issue when running as root. So, I could not run it under sudo and I was back to the \"Attempt to unlock\" error.\n\nThis time, I tried to delete my folder and try again using the advice in this post. But, it too failed.\n\nIn the end, it turned out to be that the folder simply did not exist and bower was not creating it.\n\nConclusions\n\nUse the following commands when installing MEAN on Ubuntu 14.04 and starting a new project."]}