Getting started with the MEAN stack

If you’re looking for a tutorial series that steps you through everything you need to create your first Web App with the Mean Stack. You’re in the right place πŸ™‚

The MEAN Stack

MongoDB (database)
Express.js (middleware)
Angular.js (client side magic)
Node.js (server)

If you haven’t already, check out the other posts in this series: It’s easier than you think, lets build a web app

 

Where do I start?

The hardest part of web development is not knowing where to start, and over thinking the process. Once you’ve jumped over that hurdle, you’ll wonder what you were so worried about!

The thing is, anyone can learn how to code.

After living life as a designer, I started to self-learn how to code by using random snippets that I found on blog posts, videos and forums like stack overflow. I built and sold my first web-app in the first month.

One of the first things that I learnt about web development was that almost every developer works on a JIT (Just In Time) approach to development. They learn (or use Google to find) what they need to know, when they need to know it.

With technology changing all the time, and answers to almost every foreseeable question posted somewhere on the web, there’s no need to memorise code. The key is in understanding the frameworks, understanding how things fit together, and getting really good at performing Google searches.

So knowing that you should be able to Google your way out of any error or issue you find along the way, here are the steps that you need to get started.

There are a few steps here, so take a breath and we’ll go through them one sip at a time.

During the set up process you will have at least 3 applications open:

  1. a command line utility (e.g. command prompt, powershell, xcode),
  2. a browser (e.g. chrome), and
  3. a code editing program (e.g. WebStorm)

 

Set up your environment

If you’re using a Windows machine, you have a couple of extra steps to do before you start:

  1. install Python 2.7.x
  2. install Microsoft Visual Studio C++ 2012 Express

On Windows/Mac/Other:

    1. install Node.js
    2. install Git

You can read more about Git in my post over here: Do you git it? Open source tips and tricks

When downloading the software above, get the most recent versions for your operating system and follow the prompts to do the installations. The default settings will work just fine.

Once you’ve installed the software above, you’re set to use almost any Node.js based code.

Get a good IDE for web development

IDE stands for integrated development environment. IDE software provides lots of tools in one place. Most developers that I know use: Webstorm or Sublime text.

I use Webstorm, because I’m familiar with it, and it’s easier for me to jump across to Android Studio to do Android development, as they are both based on IntelliJ IDEA.

You should use whatever you’re comfortable with.

Start the global MEAN Stack installation

We begin the installation process by using Node.js to install a few key programs globally on your computer. Installing something globally means that you install it once, and you can use it for all of your apps.

Quick Tip:
The installation process for the MEAN Stack uses the command line (e.g. command prompt, powershell, xcode). If you’re running Windows, then you need to start your command line tool as an administrator. To do this, find the icon for the application that you want to run, right click on it and select “Run as administrator”.

Now that we’ve got the command line open. Let the installations begin!

We’ll use npm – Node’s package manager to install a set of packages.

Look for for all the references of npm below.

Quick Tip:
When you see the “$” icon next to the code below – the “$” sign is a universal way to indicate that a line of code should go into your command line program. So, don’t copy the $ symbol, but do type (or copy) the text that comes after it into your command line program (command prompt, powershell, xcode).

 

Install Bower globally:

Bower is another package manager. It can be used when you want to add packages of code to your web app, Bower can help you quickly install the code, and help you upgrade to newer versions.

Why do we need two package managers? At a high level, npm (Node’s package manager) is used for node and server side packages, whereas Bower is often used for client side packages.
$ npm install -g bower

Install Grunt globally:

Grunt helps you automate repetitive tasks. Grunt comes in lots of different varieties, and its job is to make your job easier.
$ npm install -g grunt-cli

Install Yo globally:
Yo is a scaffolding tool. It can be used to create and set-up your app by asking you questions, taking your input and pre-filling parts of your app based on your preferences. It can also help you to quickly create and extend parts of your app.
$ npm install -g yo

 

What Flavours of MEAN can I get?

There are quite a few variations of the MEAN Stack on GitHub. The two key repos are:

I think that MEAN.JS is a good place to start for beginners, especially to leverage Yo.

 

Install the MEAN.JS generator:

The MEAN.js generator is the MEAN based code that will be used by Yo to help you pre-populate parts of your app.
$ npm install -g generator-meanjs

 

Create your MEAN App

Now we’ll use Yo and tell it to take the mean.js generator, and create a new app. The next set of installations will all be done ‘locally’ – within the folder of our new app.

Almost there!

Create and Navigate into the directory where you want to create your project.

For example: if I wanted to set up my MEAN app in a new folder called myMEANProject, I would do the following:

$ cd C:\Users\Jane
$ mkdir myMEANProject
$ cd C:\Users\Jane\myMEANProject

 

Run the MeanJS Generator

The last step is to generate a new MEAN app using Yo and the MEAN generator that we installed above:
$ yo meanjs

This tells ‘Yo’ to use the ‘meanjs generator’ to ask you a set of questions – answer each question and hit the Enter key to move onto the next question.

Once you get to the end, the relevant dependencies (the packages of code that your app will use) for the MEAN stack will be installed.

Grab some hot chocolate (or a coffee, vodka, wine, beer – however you roll). This will take a few minutes.

Help! It didn’t work!

If you get to the end and the process fails, then do the following:
Only if the install fails, try one of these:
1. $ npm cache clean
2. $ npm update
3. $ bower update

Leave your command line tool open. You’ll need it again in a few minutes.

If you’re riding high on the sweet smell of hot chocolate, then please take the crease, you’re about to smash a six.

Set up a MongoDB database:

We’re going to set up a free sandbox account.

Go to Compose or Mongolab and log-in or register for a new account.

If you’re using Compose, I’ve updated the steps to creating a sandbox environment using Compose here.

Why did we just create a Database? Because we need the connection details for our MEAN app to connect to it and save data.

Hint: at this point you should have a string that looks something like this:

 mongodb://user:password@something.mongohq.com:10002/mydatabase

 

Add your MongoDB to your MEAN app

Open your new app in your IDE, e.g. use Webstorm or Sublime editor to locate and open your project directory.

Once you’ve opened the directory, find the following file:

project/config/env/development.js

We need to update the details of the database connection.

For example, if I created a database with the following details:

Username: jane
Password: janesapp
Database: mydatabase
Server: something.mongohq.com
Port: 10002

Then my development.js file would look like one below:

'use strict';

module.exports = {
 db: 'mongodb://jane:[email protected]:10002/mydatabase',
 app: {
 title: 'myApp - Development Environment'
 },

OR

'use strict';

module.exports = {
	db: {
		uri: 'mongodb://something.mongohq.com:10002/mydatabase',
		options: {
			user: 'jane',
			pass: 'janesapp'
		}
	},

 

Now for the moment of truth!

Pop back into your command line, it’s still open, yeah? :), if not, just open it back up and change directories into your project folder. For example:
$ cd C:\Users\Jane\myMEANProject

In your command line utility, type the following to kick off grunt (Grunt will do the heavy lifting by preparing everything you need to start your app):
$ grunt

At this point you should see a few lines run past on your command line. Once you see the line:
MEAN.JS application started on port 3000“, then do this:

  1. Open up a browser window (e.g. Chrome) and navigate to http://localhost:3000
  2. If you see the MEAN.js landing page, then:
    • push back your chair
    • jump to your feet (or sit if you prefer)
    • do a little “Because I’m happy, clap along..” dance

Help! I don’t see anything!

If you get to this point and only see a blank screen at localhost:3000, then your client side packages may not have installed.

Have a quick look to see if you have any folders in this location:

YourProject > public > lib > (folders here).

If you don’t have a heap of folders that match up to your bower.json file then don’t stress. It happens.

  • Try the command $ bower update in your command line, or if that fails, then
  • Try $ bower update packageName where ‘packageName’ is the name of each package in your bower.json file that is not in your public > lib folder.

97 Comments

Let me know what you think

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Raj
    Reply

    Hi,

    I am stuck in the last step, when I run grunt on the terminal I am getting the following error in the Terminal.
    I am using Ubuntu 14.04. Please help!

    hunter ((0.4.2) *) mean $ grunt
    (node:22435) DeprecationWarning: process.EventEmitter is deprecated. Use require(‘events’) instead.
    Running “env:dev” (env) task

    Running “sass:dist” (sass) task

    Running “less:dist” (less) task

    Running “jshint:all” (jshint) task
    >> 110 files lint free.

    Running “eslint:target” (eslint) task

    Running “csslint:all” (csslint) task
    >> 3 files lint free.

    Running “mkdir:upload” task

    Running “copy:localConfig” (copy) task
    Copied 1 file

    Running “concurrent:default” (concurrent) task
    Running “watch” task
    Waiting…
    (node:22454) DeprecationWarning: process.EventEmitter is deprecated. Use require(‘events’) instead.
    Running “nodemon:dev” (nodemon) task
    [nodemon] 1.10.0
    [nodemon] to restart at any time, enter `rs`
    [nodemon] watching: server.js config/**/*.js modules/*/server/**/*.js
    [nodemon] starting `node –debug server.js`
    (node:22455) DeprecationWarning: process.EventEmitter is deprecated. Use require(‘events’) instead.
    Debugger listening on port 5858


    MEAN.JS – Development Environment
    Environment: development
    Port: 3000
    Database: mongodb://:@ds161255.mlab.com:61255/meanapp_test
    App version: 0.4.2
    MEAN.JS version: 0.4.2

    events.js:160
    throw er; // Unhandled ‘error’ event
    ^

    Error: read ECONNRESET
    at exports._errnoException (util.js:1007:11)
    at TCP.onread (net.js:563:26)
    [nodemon] app crashed – waiting for file changes before starting…

    ————————————————————————————————————————————————————–

    I tried to run it again : (

    ————————————————————————————————————————————————————–
    hunter ((0.4.2) *) mean $ grunt
    (node:22592) DeprecationWarning: process.EventEmitter is deprecated. Use require(‘events’) instead.
    Running “env:dev” (env) task

    Running “sass:dist” (sass) task

    Running “less:dist” (less) task

    Running “jshint:all” (jshint) task
    >> 111 files lint free.

    Running “eslint:target” (eslint) task

    Running “csslint:all” (csslint) task
    >> 3 files lint free.

    Running “mkdir:upload” task

    Running “copy:localConfig” (copy) task

    Running “concurrent:default” (concurrent) task
    (node:22610) DeprecationWarning: process.EventEmitter is deprecated. Use require(‘events’) instead.
    Running “nodemon:dev” (nodemon) task
    Running “watch” task
    Waiting…
    [nodemon] 1.10.0
    [nodemon] to restart at any time, enter `rs`
    [nodemon] watching: server.js config/**/*.js modules/*/server/**/*.js
    [nodemon] starting `node –debug server.js`
    (node:22611) DeprecationWarning: process.EventEmitter is deprecated. Use require(‘events’) instead.
    Fatal error: Port 35729 is already in use by another process.
    Debugger listening on port 5858
    Warning: (node:22611) DeprecationWarning: process.EventEmitter is deprecated. Use require(‘events’) instead. Use –force to continue.

    Aborted due to warnings.

  • Falk
    Reply

    Hey Shristi,

    thank you for putting this together. I have followed the installation instructions and everything works after some minr hiccups. However the “$ yo meansjs” is not taking a little time, its taking forever. It has been running for close to 4 hours by now.

    I also noticed that the questions I answered in that process were quite different from the ones shown in the video. Could I be running into some kind of version conflict?

    node: 4.4.4
    npm: 3.9.0
    bower: 1.7.9
    yo: 1.8.1

  • Siva
    Reply

    Hi Shristi,
    Thanks for making this tutorial. I got through all of it without any problems except these two at the very very end, at the moment of truth (arghh!) πŸ™‚

    1. When I tried to run “grunt”, it would fail to find a local copy… I googled a bit and found that I needed to install grunt locally (? is this correct ?). Anyhoo, I followed that guidance and got grunt to run.. but then ran into problem #2 that has me stumped….

    2. Upon running grunt, it hangs with some error messages. (NOTE: above these error messages there were a bunch of warnings from several .js files, all of them were the same “warning Unexpected console statement no-console”. But I am assuming these warnings are ok to ignore (correct?)
    Am running on Mac OS X (El Capitan)… I have no idea where to look or what to change or even what error to google πŸ™‚
    Please help.
    -Siva

    —————— ERROR MESSAGES ——————-
    .
    .
    Running “concurrent:default” (concurrent) task
    Running “nodemon:dev” (nodemon) task
    Running “watch” task
    Waiting…
    [nodemon] 1.9.1
    [nodemon] to restart at any time, enter `rs`
    [nodemon] watching: gruntfile.js modules/*/server/views/*.html server.js config/**/*.js modules/*/server/**/*.js modules/*/server/config/*.js
    [nodemon] starting `node –debug server.js`
    Debugger listening on port 5858

    /Users/ssna/osx/projects/myMEANProject/mean/node_modules/mongoose/node_modules/mongodb/lib/server.js:242
    process.nextTick(function() { throw err; })
    ^
    Error: getaddrinfo ENOTFOUND undefined undefined:27017
    at errnoException (dns.js:26:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
    [nodemon] app crashed – waiting for file changes before starting…

    • Siva

      Hi Shristi
      Please ignore my plea for help above πŸ™‚ I resolved the issue – although I am not sure why this fixed it.

      Turns out the problem was with the way I had edited the address for the mongodb instance in the development.js file.
      Your tutorial step showed TWO options of how to edit it. I had use the former (db: ‘mongodb://….) but for some reason it was throwing the error above. I then replaced it with the other approach using uri and options and voila that resolved the problem. I Perhaps you can shed some light on why the first approach bombed…

      Thanks again!
      -Siva

  • Premkumar Agrawal
    Reply

    Hey Shrishti,
    It really incredible and helpful bundle of knowledge..
    Using which I done with all installations and setup. But while creating a new project using yo meanjs command it takes hours to create app..

    Is anything wrong with me or should I try something else..
    Please suggest…

    • Bossable

      It shouldn’t take more than a few seconds, so hours is way too long. I’d first check if yo is picking up your meanjs generator.

      Type ‘yo’ in your command line to see what which generators are being picked up.

    • Premkumar Agrawal

      I’m getting this relpy after executing “yo”

      C:\Users\premkumar.agrawal>yo
      ? ‘Allo premkumar! What would you like to do? (Use arrow keys)
      Run a generator
      > Meanjs
      ──────────────
      Update your generators
      Install a generator
      Find some help
      Get me out of here!
      ──────────────

  • Abbas
    Reply

    Hi,

    I can’t find “project/config/env/development.js” in my project directory except one folder named “.idea” which contains a few xml files. Does it mean my installation is not successfully? All my commands ran successfully. Any help will be appreciated.

  • Rajagopal Subramanian
    Reply

    Hi,

    When I run grunt I get the following error.

    Loading “grunt-karma.js” tasks…ERROR
    >> Error: Cannot find module ‘glob’
    Loading “mocha-test.js” tasks…ERROR
    >> Error: Cannot find module ‘mocha’

    Running “env:dev” (env) task

    Running “sass:dist” (sass) task

    Running “less:dist” (less) task

    Running “jshint:all” (jshint) task
    >> 74 files lint free.

    Running “csslint:all” (csslint) task
    >> 2 files lint free.

    Running “mkdir:upload” task

    Running “copy:localConfig” (copy) task

    Running “concurrent:default” (concurrent) task
    Loading “grunt-karma.js” tasks…ERROR
    >> Error: Cannot find module ‘glob’
    Loading “mocha-test.js” tasks…ERROR
    >> Error: Cannot find module ‘mocha’
    Loading “grunt-karma.js” tasks…ERROR
    >> Error: Cannot find module ‘glob’
    Loading “mocha-test.js” tasks…ERROR
    >> Error: Cannot find module ‘mocha’

    Running “nodemon:dev” (nodemon) task
    [nodemon] 1.8.1

    Running “watch” task
    [nodemon] to restart at any time, enter `rs`
    [nodemon] watching: server.js config/**/*.js modules/*/server/**/*.js
    [nodemon] starting `node –debug server.js`
    Waiting…
    Debugger listening on port 5858
    module.js:338
    throw err;
    ^

    Error: Cannot find module ‘glob’
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (E:\crud_in_mean\crud_in_mean\config\config.js:8:10)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    [nodemon] app crashed – waiting for file changes before starting…

    I googled but nothing helped. Thanks in advance

  • Aaqib Hussain (@iAaqibHussain)
    Reply

    Hello Shristi!
    I am using Windows 10, and followed every step you did, but when I run yo meanjs. I get this
    C:\Windows\system32\cmd.exe /s /c “cd mean && npm install”
    npm WARN engine [email protected]: wanted: {“node”:”>=0.8 =1 <=2"} (current: {"node":"5.1.0","npm":"3.3.12"})
    npm WARN install Couldn't install optional dependency: Unsupported
    npm WARN install Couldn't install optional dependency: Unsupported
    npm WARN prefer global [email protected] should be installed with -g
    npm WARN prefer global [email protected] should be installed with -g
    npm WARN prefer global [email protected] should be installed with -g
    npm WARN prefer global [email protected].2 should be installed with -g
    gyp ERR! build error
    gyp ERR! stack Error: `msbuild` failed with exit code: 1
    gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
    gyp ERR! stack at emitTwo (events.js:87:13)
    gyp ERR! stack at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Windows_NT 10.0.10240
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
    gyp ERR! cwd D:\MeanStack\MeanStackStarter\mean\node_modules\node-inspector\node_modules\bufferutil
    gyp ERR! node -v v5.1.0
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok
    npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
    npm WARN install:[email protected] Exit status 1
    gyp ERR! build error
    gyp ERR! stack Error: `msbuild` failed with exit code: 1
    gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
    gyp ERR! stack at emitTwo (events.js:87:13)
    gyp ERR! stack at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Windows_NT 10.0.10240
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
    gyp ERR! cwd D:\MeanStack\MeanStackStarter\mean\node_modules\node-inspector\node_modules\utf-8-validate
    gyp ERR! node -v v5.1.0
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok
    npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
    npm WARN install:[email protected] Exit status 1
    gyp ERR! build error
    gyp ERR! stack Error: `msbuild` failed with exit code: 1
    gyp ERR! stack at ChildProcess.onExit (D:\MeanStack\MeanStackStarter\mean\node_modules\node-gyp\lib\build.js:270:23)
    gyp ERR! stack at emitTwo (events.js:87:13)
    gyp ERR! stack at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Windows_NT 10.0.10240
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\MeanStack\\MeanStackStarter\\mean\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "–fallback-to-build" "–module=D:\\MeanStack\\MeanStackStarter\\mean\\node_modules\\v8-debug\\build\\debug\\v0.4.6\\node-v47-win32-x64\\debug.node" "–module_name=debug" "–module_path=D:\\MeanStack\\MeanStackStarter\\mean\\node_modules\\v8-debug\\build\\debug\\v0.4.6\\node-v47-win32-x64"
    gyp ERR! cwd D:\MeanStack\MeanStackStarter\mean\node_modules\v8-debug
    gyp ERR! node -v v5.1.0
    gyp ERR! node-gyp -v v3.1.0
    gyp ERR! not ok
    node-pre-gyp ERR! build error
    node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe D:\MeanStack\MeanStackStarter\mean\node_modules\node-gyp\bin\node-gyp.js build –fallback-to-build –module=D:\MeanStack\MeanStackStarter\mean\node_modules\v8-debug\build\debug\v0.4.6\node-v47-win32-x64\debug.node –module_name=debug –module_path=D:\MeanStack\MeanStackStarter\mean\node_modules\v8-debug\build\debug\v0.4.6\node-v47-win32-x64' (1)
    node-pre-gyp ERR! stack at ChildProcess. (D:\MeanStack\MeanStackStarter\mean\node_modules\v8-debug\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
    node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
    node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
    node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:818:16)
    node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
    node-pre-gyp ERR! System Windows_NT 10.0.10240
    node-pre-gyp ERR! command “C:\\Program Files\\nodejs\\node.exe” “D:\\MeanStack\\MeanStackStarter\\mean\\node_modules\\v8-debug\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp” “install” “–fallback-to-build”
    node-pre-gyp ERR! cwd D:\MeanStack\MeanStackStarter\mean\node_modules\v8-debug
    node-pre-gyp ERR! node -v v5.1.0
    node-pre-gyp ERR! node-pre-gyp -v v0.6.15
    node-pre-gyp ERR! not ok
    npm WARN EPEERINVALID [email protected] requires a peer of kerberos@~0.0 but none was installed.
    npm WARN EPACKAGEJSON [email protected] No repository field.
    npm ERR! Windows_NT 10.0.10240
    npm ERR! argv “C:\\Program Files\\nodejs\\node.exe” “C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js” “install”
    npm ERR! node v5.1.0
    npm ERR! npm v3.3.12
    npm ERR! code ELIFECYCLE

    npm ERR! [email protected] install: `node-pre-gyp install –fallback-to-build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] install script ‘node-pre-gyp install –fallback-to-build’.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the v8-debug package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-pre-gyp install –fallback-to-build
    npm ERR! You can get their info via:
    npm ERR! npm owner ls v8-debug
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! D:\MeanStack\MeanStackStarter\mean\npm-debug.log

    at ChildProcess.exithandler (child_process.js:213:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

    and when I run grunt in the mean folder that it creates I get this.
    $ grunt
    >> Local Npm module “grunt-node-inspector” not found. Is it installed?

    Running “env:dev” (env) task

    Running “sass:dist” (sass) task

    Running “less:dist” (less) task

    Running “jshint:all” (jshint) task
    >> 86 files lint free.

    Running “csslint:all” (csslint) task
    >> 2 files lint free.

    Running “mkdir:upload” task

    Running “copy:localConfig” (copy) task
    Copied 1 file

    Running “concurrent:default” (concurrent) task
    >> Local Npm module “grunt-node-inspector” not found. Is it installed?
    >> Local Npm module “grunt-node-inspector” not found. Is it installed?

    Running “nodemon:dev” (nodemon) task

    Running “watch” task
    Waiting…
    Fatal error: watch C:\Windows\TEMP\nodemonCheckFsWatch452d6474489cf84b93679395b55c9461 EPERM
    internal/child_process.js:374
    throw errnoException(err, ‘kill’);
    ^

    Error: kill EINVAL
    at exports._errnoException (util.js:856:11)
    at ChildProcess.kill (internal/child_process.js:374:13)
    at process. (D:\meanstack\meanstackstarter\mean\node_modules\nodemon\lib\monitor\run.js:316:22)
    at emitOne (events.js:82:20)
    at process.emit (events.js:169:7)
    at process.exit (node.js:760:17)
    at tryToExit (D:\meanstack\meanstackstarter\mean\node_modules\exit\lib\exit.js:17:15)
    at Object.exit (D:\meanstack\meanstackstarter\mean\node_modules\exit\lib\exit.js:34:3)
    at Object.fail.fatal (D:\meanstack\meanstackstarter\mean\node_modules\grunt\lib\grunt\fail.js:57:14)
    at process.uncaughtHandler (D:\meanstack\meanstackstarter\mean\node_modules\grunt\lib\grunt.js:130:10)
    Warning: internal/child_process.js:374
    throw errnoException(err, ‘kill’);
    ^

    Error: kill EINVAL
    at exports._errnoException (util.js:856:11)
    at ChildProcess.kill (internal/child_process.js:374:13)
    at process. (D:\meanstack\meanstackstarter\mean\node_modules\nodemon\lib\monitor\run.js:316:22)
    at emitOne (events.js:82:20)
    at process.emit (events.js:169:7)
    at process.exit (node.js:760:17)
    at tryToExit (D:\meanstack\meanstackstarter\mean\node_modules\exit\lib\exit.js:17:15)
    at Object.exit (D:\meanstack\meanstackstarter\mean\node_modules\exit\lib\exit.js:34:3)
    at Object.fail.fatal (D:\meanstack\meanstackstarter\mean\node_modules\grunt\lib\grunt\fail.js:57:14)
    at process.uncaughtHandler (D:\meanstack\meanstackstarter\mean\node_modules\grunt\lib\grunt.js:130:10) Used –force, continuing.

    Done, but with warnings.

    I have no idea what to do anymore. I googled and everything but nothing helped.

    • bossable

      Hey there – a few options:

      1. A lot of people seem to be having issues with their version of node, often downgrading to nodejs 0.12.x seems to work (https://github.com/meanjs/mean/issues/1015)

      2. For the error ” gyp ERR! stack Error: `msbuild` failed with exit code: 1 or gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1

      Try this:

      Open up visual studio and create a new C++ project. The creation of the C++ project seems to install whatever was missing for the build process.

      3. You may need to install some packages manually like grunt-node-inspector (npm install grunt-node-inspector) or others that may be missing in your node_module (they seem to only appear one at a time, so check against your package.json file)

      4. Because the install fails, you’ll also need to check that your bower packages have installed correctly

      Hope this helps!

  • Philip
    Reply

    Error message on yo meanjs install- Windows10 – error message: ‘rm’ is not recognized as an internal or external command, operable program or batch file.
    Node is installed. The message comes up after entering: yo meanjs and then choosing the proposed version of yo. Installed on the local folder.

  • Volod
    Reply

    Hi! I see that your tutorials are great and helpfull!
    But I kind of got stuck in the beggining. After generating new project my folders structure does not contain the ‘app’. Is it an issue? Please help me find it)

    • Volod

      Ok, now I understand that in latest version of mean js the folder structure differs from previous. Files from ‘app’ folder now in folders of ‘module’ folder.

  • Sharath Kumar R
    Reply

    Hello Shristi,

    First of i would like to thank you for such a wonderful tutorial. I have a lot in the google. I didn’t get anything. It will be better if you do SEO for your site. It will help for many.

    I have installed all the required software as per the description. When i try to create a new app by typing yo meanjs, i asked few questions which i entered.

    After this, i came across a huge error list. Something like below

    Running npm install for you….
    This may take a couple minutes.
    Unhandled rejection Error: Command failed: /bin/sh -c cd mean && npm install
    npm WARN package.json [email protected] No repository field.
    npm WARN engine [email protected]: wanted: {“node”:”>=0.8 =1 <=2"} (current: {"node":"4.1.0","npm":"2.14.3"})
    npm WARN peerDependencies The peer dependency [email protected] included from grunt-mocha-istanbul will no
    npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
    npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
    In file included from ../src/bufferutil.cc:16:
    ../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
    NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
    ^
    ../node_modules/nan/nan.h:256:25: note: previous definition is here
    NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) {
    ^
    ../node_modules/nan/nan.h:661:13: error: no member named ‘smalloc’ in namespace ‘node’
    , node::smalloc::FreeCallback callback
    ~~~~~~^
    ../node_modules/nan/nan.h:672:12: error: no matching function for call to ‘New’
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
    ^~~~~~~~~~~~~~~~~
    /Users/SharathNasa/.node-gyp/4.1.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from ‘uint32_t’ (aka ‘unsigned int’) to ‘enum encoding’ for 3rd argument
    NODE_EXTERN v8::MaybeLocal New(v8::Isolate* isolate,

    I have shortened it. It’s really huge trust me.

    In my MAC, the node i’m having is the latest version node V4.1.0.

    But when i see in the error, it says —> engine [email protected]: wanted: {“node”:”>=0.8 =1 <=2"} (current: {"node":"4.1.0","npm":"2.14.3"})

    This was creating the problem. When i downgraded the node(V0.10), it was working fine. Which is not fine. It is such a lower version.

    Could you please help me with this.

    Regard,
    Sharath

  • trungcr
    Reply

    Hi! How to fix this error. When i use command “yo meanjs”, but not show as in video. It’s:
    undefined
    You’re using the official MEAN.JS generator.
    What mean,js version would you like to generate? i choose 0.4.0
    In which filder would you like the project to be generated? mean
    Cloning the MEAN repo…
    Then it appear error:
    Command failed: C:\Windows\system32\cmd.exe /s /c “rm ./mean/package.json”
    ‘rm’ is not recognized as an internal and external command, operable program or batch file.

  • StuffieStephie
    Reply

    Hello Shristi. First off, I wanna say I’m really glad I found your site! The organization and goal and everything is great! πŸ˜€
    Unfortunately, I’ve hit a bit of a snag… Initially, I had the same common problems that other users have had (bower not doing its thing, path to Git not set up etc.). I seem to have moved passed these issues but now I’m having a problem with the app crashing. Here’s a screencap
    http://s296.photobucket.com/user/StuffieStephie/media/BossableTutProblems_zpszmgnd7ot.jpg.html

    I’m using Windows 7 and I’m pretty sure I’ve got Python and everything installed… Any ideas? Sorry if the error codes make it obvious what’s wrong and I’m just being obtuse. I’m kind of a noob when it comes to CLI stuff.

    Any help would be very much appreciated!

    • bossable

      Hey Stephie,

      A couple of errors stand out, firstly if you have python 2.7 and visual studio installed, then I’d suggest compiling to get rid of the bson errors:
      run ‘npm cache clean’, and then ‘npm install mongoose connect-mongo’ <-- these are the packages using the extensions Running the javascript versions, as you currently have them are fine too, it can just be a little slower. The other issue relates to TTL, which can happen when you try to connect to the mongodb too many times in quick succession, or when a connection is made before the session store. Try stopping the server, waiting a minute and then starting the server. Assuming you have the most recent version of meanjs, if the TTL error continues to persist, and you haven't changed any of the express code, then I'd suggest raising an issue on the meanjs Github.

  • Zachary Bottorff
    Reply

    I keep getting a “could not connect to MongoDB!” and “Error: failed to connect to [[object Object]:27017]” when running grunt. Everything else seems to be good. Otherwise I’m just using the Install Mean Stack document, using MondoLab, anything I did wrong?

  • Vincent Elliott
    Reply

    Hi Shristi, Thanks for your “just what the doctor ordered” tutorials.
    I have successfully installed Mean.js as per the tutorial, however I am experiencing a small problem…both IE11 and Chrome displays the startup page with no issues but Firefox v37.0.2 only displays a blank screen with no error. When I check the grunt console logs it simply reports “GET / 304 14.579 ms – -“.

    What could possibly be the problem with Firefox?

    • bossable

      Hey Vincent – Hmm… I’m not sure. I haven’t used Firefox in a long time. I’d start with checking if all of the source files are being downloaded and available to the browser.

  • Thoai Nguyen
    Reply

    Things work well until I incorporated the “Customers” feature. The code : Save & Close in the “create.customer.client.view.html” does not seem to trigger any actions on the “customer.client.controller.js” upon the “Save & Close” button clicking. Consequently, no “new customer” profile was create and stored on MongoDB. The list-coustomer page is blank. Any ideas to help?

    • Thoai Nguyen

      The clicking of the “Save&Close” button on the Create New Customer view (via create-customer.client.view.html)… does not seem to trigger any action on the Customer Create controller (via customers.client.controller) to create and save the new Customer profile on mongodb.

      CREATE-CUSTOMER.CLIENT.VIEW.HTML:

      New Customer

      ……..
      ……..

      Save & Close
      Cancel

      CUSTOMERS.CLIENT.CONTROLLER.JS

      use strict’;

      // Customers controller

      var customersApp = angular.module(‘customers’);

      customersApp.controller(‘CustomersController’, [‘$scope’, ‘$stateParams’, ‘Authentication’, ‘Customers’, ‘$modal’, ‘$log’,
      function($scope, $stateParams, Authentication, Customers, $modal, $log) {
      console.log(‘CustomersController Start’);
      this.authentication = Authentication;

      …..
      …..
      ]);

      customersApp.controller(‘CustomersCreateController’, [‘$scope’, ‘Customers’, ‘Notify’,
      function($scope, Customers, Notify) {
      console.log(‘CustomersCreateController Start’);
      //Create new Customer
      $scope.create = function() {
      console.log(‘Client: Create new Customer’);
      // Create new Customer object
      var customer = new Customers ({
      firstName: this.firstName,
      surname: this.surname,
      suburb: this.suburb,
      country: this.country,
      industry: this.industry,
      email: this.email,
      phone: this.phone,
      referred: this.referred,
      channel: this.channel
      });

      // Redirect after save
      console.log(‘Client: Before customer save’);
      customer.$save(function(response) {
      console.log(‘Client: Notify after save’);
      Notify.sendMsg(‘NewCustomer’, {‘id’: response._id});
      }, function(errorResponse) {
      console.log(‘Client: error’);
      $scope.error = errorResponse.data.message;
      });
      };
      console.log(‘CustomersCreateController End’);
      }
      ]);

      Do I miss any things for the above codes to work?

      Also I tried to incorporate the rest of the “customers” code to create the “drop-down” list for the Channel data field (with Facebook, Twitter, Email options) on the Create New Customer view.. However, I did not see the drop-down options shown up on this page either? It sounds like a mystery…as if Grunt did not pick up the latest code change? {I saw grunt message to inform the detection of the change, though] The two problems seem unrelated, but I feel that I should bring it up the 2nd problem here as well. I still try to check if I may have any typos on the code and html view.

    • Thoai Nguyen

      I cut and pasted the “modal footer” code from create-customer.client.view.html file….but this code did not show up on my previous reply, so I re-typed the code here for you to see.

      div class=”modal-footer”

      button class=”btn btn-success btn-lg” ng-click=”customerCtrl.create(); ok();”
      ng-disabled=”createCustomerForm.$invalid” Save & Close button

      /div

      The web page program probably will strip out and will not display the the html code again, so I take out the of html tags…so you can see the actual code.

    • bossable

      Hey Thoai,

      Is your issue that the controller to create the Customer is not being called? From a quick look through your code, one thing that stands out is this:
      On your button you have ng-click=”customerCtrl.create(); ok();”
      However, in your controller you have:


      customersApp.controller(β€˜CustomersCreateController’, [β€˜$scope’, β€˜Customers’, β€˜Notify’,
      function($scope, Customers, Notify) {
      //Create new Customer
      $scope.create = function() {
      console.log(β€˜Client: Create new Customer’);
      // Create new Customer object
      var customer = new Customers ({

      Because you’re using $scope in your controller, the ‘Controller As’ alias probably wont work, so my suggestion would be to change it to the following:

      //Create new Customer
      this.create = function() {

      It’s a little hard to read your code without formatting, so if this doesn’t solve it, just shoot me an email over at https://bossable.com/say-hello/

    • Thoai Nguyen

      Your suggested change fixed the problem. I made the right decision to ask you the question. Thanks,

  • Thoai Nguyen
    Reply

    I really like the sophistication of the “yo meanjs” feature. It seems to structure the application development folders and automatically generate code for you (e.g., core, user modules, server.js). However, there are a few (but major) things that I do not like or expect during the process of development:

    1) I have a habit of saving the current code – For example, I saved the file “user.server.model.js” to “user.server.model.orig.js” before modifying the “user.server.model.js” file. I got all kinds of errors when starting running the application (i.e., grunt) since it seemed to pick up the code from the “user.server.model.orig.js” file instead of the correct “user.server.model.orig” file. When I deleted all the “…orig….” files, everything started working. I wonder 1)why this happens since developers tend to have multiple versions of the same files on the same directory. and 2)There is a way that I can do, so that I will have “orig”, “new”, “current” versions of the same file and things still work.

    2) When I run “yo meanjs”, I see “public/lib/angular*” folders created at my home computer. When I ran the same command “yo meanjs” at work computer (behind the organization firewall), I got an error with bower install access error to “git://..” when running “git ls-remote –tags –heads git://github.com/twbs/bootstrap”. I had to copy the whole directory “public/lib/angular*” from home computer to work computer and grunt started working. What can I do to be able to run “bower install” at work computer without seeing “git://*” accesss errors?

    3)The framework is great and very powerful. I feel much better to use it and they are clean and have no bugs. If there are bugs, then I do not know how to fix them. I saw a lot of errors and warnings during “yo meanjs” process (that I do not understand fully) but things still work. When I generate my own folders and develop without using the framework, then I have better control and can fix the errors easier. I assume that you strongly suggest using the framework since it can save a lot of time for development. Who should I contact and report when encountering “jo meanjs” framework types of errors [besides surfing for solutions on Google search for most cases]?

    Thanks much in advance for your responses.

  • Roger Layton
    Reply

    Thanks Shristi (sorry – called you Jane by mistake) for an exceptional introduction to MEAN and its installation. I have only been through the first video/page, but this is high quality and very well presented and I look forward to getting through the other 30 videos as quickly as possible. You are saving me weeks of experimentation to get to what you have provided.

    • bossable

      Hey Roger, great to hear that you found it helpful! Let me know how you go with the rest of the videos.

      (Jane is my go-to example alter-ego πŸ™‚

    • Raj Sathya

      Hi Shristi, Great videos so far. do you have the final code uploaded in git somewhere? It will be very helpful to compared the code after the completion of the video for troubleshooting purposes. Send me the link if you have already uploaded in git.

    • bossable

      Hey Raj – Thanks for checking out the videos. I actually didn’t keep a repo of the project that was created through the challenge. I never expected the videos to get so popular! I cleaned up the files after I finished the challenge videos and included feedback/comments that I received from people during the 30 days. These final files (the extended version) are available in the Bossable Store.

    • bossable

      Hey Karthik,

      Do you have Angular installed? You should end up with folders in this location: YourProject > public > lib > ( folders here).
      If you don’t have Angular installed, then try the command ‘bower update’ in your command line, or if that fails, then
      Try ‘bower update packageName’ for each package in your bower.json file

    • karthik

      Hey! thank you its working perfectly. and i need how the mvc structure working video for mean.js

  • Rebecca
    Reply

    Hi, thanks for this tutorial – it’s really great and easy to follow. However, I’m having an issue with the very last step as I get an error from grunt when it tries to connect to my mongodb database. I’m using mongolab and I just get an error message from grunt saying it failed to connect. I have changed line 4 in the development.js file to be the uri string and I have entered my database username and password, but it is still not connecting. Have you got any ideas why? Would love some help so I can carry on with the tutorial.

    • Rebecca

      Actually, I now seem to have fixed my own problem! Not even sure what was wrong. I just tried creating a new database and now it’s working – yay! Thanks again for the great tutorials. I shall be continuing tomorrow with the next one.

  • ugur
    Reply

    hi shristi,

    great site and extremely heplful videos. i learned alot about meanjs from your videos. in the meantime i decided to build a simple meanjs app. it all went good but finally i stuck. i’m trying to figure out how to create a user profile page, which includes user info (not logged in user, but any user) and posts belong to that user. i asked this on stack exchange with code snippets and in detail and got no real answers so far.

    https://stackoverflow.com/questions/28631006/meanjs-user-profile-functionality

    can you please explain how to achieve this kind and functionality with meanjs in a new video or blog post.

    best regards

  • klotfi
    Reply

    Thanks for your great tutorial – just thought to drop a quick note – I just downloaded nodejs and got a lot of errors when running “npm meanjs” – after few search, it seems the problem was with npm version that comes with nodejs so I upgraded to 2.2 (there are higher version but chose 2.2 since every one was saying that 2.2 worked for them) and seems to work fine. So moving on with your tutorial – keep you posted. Thanks again

  • uzair
    Reply

    i got these errors:

    npm ERR! [email protected] postinstall: `bower install –config.interactive=false`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] postinstall script.
    npm ERR! This is most likely a problem with the mean package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! bower install –config.interactive=false
    npm ERR! You can get their info via:
    npm ERR! npm owner ls mean
    npm ERR! There is likely additional logging output above.
    npm ERR! System Windows_NT 6.2.9200
    npm ERR! command “C:\\Program Files\\nodejs\\\\node.exe” “C:\\Program Files\\no
    ejs\\node_modules\\npm\\bin\\npm-cli.js” “install”
    npm ERR! cwd C:\Users\Uzair Ali Khan\Desktop\mean learning
    npm ERR! node -v v0.10.31
    npm ERR! npm -v 1.4.23
    npm ERR! code ELIFECYCLE
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR! C:\Users\Uzair Ali Khan\Desktop\mean learning\npm-debug.log
    npm ERR! not ok code 0

    • bossable

      Looks like the npm packages have installed but it’s hit an error installing the Bower packages.
      1. Do you have Bower installed? (npm install bower -g) if so,
      2. Then run ‘bower install’ to install the bower packages, if any bower packages fail, then try ‘bower update’

    • uzair

      i updated and installed bower seems like its working…but finally when i did “grunt” one error occur
      NODE_ENV is not defined! Using default development environment

    • bossable

      That’s all good, not really an error as such, it’s more of a default setting. When you deploy the app you’ll set the NODE_ENV to production.

    • bossable

      You may be missing Angular, did you run ‘bower install’ from your app directory? In your browsers console, are you seeing ‘Uncaught ReferenceError: angular’ errors?

      If you don’t have angular packages in your β€˜Public > lib’ folder, then try this in your command line (without the $):
      $ bower update

  • Tamas
    Reply

    Hi, first of all thank you for the awesome tutorial. However I cant get it running:( all programs install just fine but when I try to install meanjs i get this error msg at the end
    bower bootstrap#~3 ENOGIT git is not installed or not in the PATH

    npm ERR! [email protected] postinstall: `bower install –config.interactive=false`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] postinstall script.
    npm ERR! This is most likely a problem with the flysfirstmean package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! bower install –config.interactive=false
    npm ERR! You can get their info via:
    npm ERR! npm owner ls flysfirstmean
    npm ERR! There is likely additional logging output above.
    npm ERR! System Windows_NT 6.2.9200
    npm ERR! command “C:\\Program Files\\nodejs\\\\node.exe” “C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js”
    “install”
    npm ERR! cwd C:\users\fly-\documents\firstmean
    npm ERR! node -v v0.10.35
    npm ERR! npm -v 1.4.28
    npm ERR! code ELIFECYCLE
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR! C:\users\fly-\documents\firstmean\npm-debug.log
    npm ERR! not ok code 0

    I wasnt sure weather this is a real error or not, but seems like everything is created. So after I created a mongo account, changed development.js as it was in the tutorial, but when I type in grunt, this is the error i get and im pretty sure this is an error:((

    grunt : The term ‘grunt’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + grunt
    + ~~~~~
    + CategoryInfo : ObjectNotFound: (grunt:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    Please help me as I really wanna try MEANjs

    Thanks you
    Tamas

    • bossable

      Have a look into mongoose and MongoDB queries. You’ll need to pass through the employee id and limit the query.

  • Phil Lambert
    Reply

    Thank you so much. All I was looking for. However, I don’t get the Mean.Js landing page at the end of the installation. Only a blank page. No error during the installation. Do you have any idea where it comes from ?

    • bossable

      Hi Phil,

      Thanks for checking out the series. You might be missing Bower files, if you don’t see any files in your Public > Lib folder, then run ‘bower update’.

  • Thendral
    Reply

    Hi,

    I am new to meanjs, followed the steps to install meansjs

    Getting below exception,locking /Users/.npm/_locks/karma-chrome-launcher-52a7f1e862c3a5a9.lock failed { [Error: EACCES, open ‘/Users/.npm/_locks/karma-chrome-launcher-52a7f1e862c3a5a9.lock’]
    npm WARN locking errno: 3,
    npm WARN locking code: ‘EACCES’,
    npm WARN locking path: ‘/Users/.npm/_locks/karma-chrome-launcher-52a7f1e862c3a5a9.lock’ }
    npm ERR! Darwin 14.0.0
    npm ERR! argv “node” “/usr/local/bin/npm” “install”
    npm ERR! node v0.10.33
    npm ERR! npm v2.1.12

    npm ERR! Attempt to unlock /Users/meanjs/node_modules/karma-chrome-launcher, which hasn’t been locked
    npm ERR!
    npm ERR! If you need help, you may report this error at:
    npm ERR!

  • Kevin
    Reply

    I keep getting a ” ‘yo’ is not recognized as the name of a cmdlet, function…” but when I run “npm view yo version” it says I have 1.3.3…any suggestions? I have uninstalled everything on the stack and reinstalled it all, but no go…

    • bossable

      Hmm…this looks like a PATH error, did you have Node in your path? and Yo installed globally? Then I would have suggested to close the command line utility and reopen it.

  • Anonymous
    Reply

    Its been several weeks, I was looking for some good tutorials for MEAN stack, looks like my search is finally over. Nicely presented. Keep up the good work Shristi.

  • Anonymous
    Reply

    HI Shusti,
    great props for this series, best yet. I managed to get it all setup, but my social buttons are giving errors like :
    Invalid App ID: APP_ID (for facebook), Error: invalid_client, The OAuth client was not found.(google). I guess I haven’t gone far enough yet?

    • bossable

      Thanks for checking out the videos.
      You may have removed the social login references from some server files but not others, just follow through the errors, or do a search to find the specific files that are looking for these references.

    • Brian

      Hey great series, as others said, I’ve spent WEEKS trying to find a good MEAN video series and yours is the best, so thank you very much!

      Anyway, on the above user’s error, I had something very similar when I was following along, I’m pretty sure it could be caused from not having the FACEBOOK_SECRET and APP_ID(or whatever they’re called, shooting from my terrible memory here) from the FB developers page, and so on for twitter, etc.

      Keep up the great work, all the time you’ve put into the series is MUCH appreciated!

  • Anonymous
    Reply

    This is a great series. I am having trouble navigating from Day 1 forward though. Bossable.com keeps showing me the last videos (Day 30 etc) when I finish one of the starting ones. It took me several tries to find Day 1. Now again searching for Day 2, it shows me Day 29, Day 28 etc… Any chance you can add a “Next Video” link to your topics?

    • bossable

      Hey there, thanks for this feedback!

      There are a few ways to find the videos:
      1 – At the bottom of each post (just above the comments) there is a ‘Next Story’ link
      2 – I’ve now also added a new section for the videos https://bossable.com/category/mean-stack-challenge/

      I’ll have a look at other options as well, might need to consider changing the theme for the site.

  • Denny
    Reply

    What does your bower.json file look like? This is what mine looks like:

    {
    “name”: “bosstest”,
    “version”: “0.0.1”,
    “description”: “Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js”,
    “dependencies”: {
    “bootstrap”: “~3”,
    “angular”: “~1.2”,
    “angular-resource”: “~1.2”,
    “angular-mocks”: “~1.2”,
    “angular-cookies”: “~1.2”,
    “angular-animate”: “~1.2”,
    “angular-touch”: “~1.2”,
    “angular-sanitize”: “~1.2”,
    “angular-bootstrap”: “~0.11.0”,
    “angular-ui-utils”: “~0.1.1”,
    “angular-ui-router”: “~0.2.10”
    }
    }

    I successfully was able to ‘$bower update’ on each of the above dependencies. (I think it was successful, because I got a message like:

    bower cached https://github.com/angular-ui/ui-router.git#0.2.11
    bower validate 0.2.11 against https://github.com/angular-ui/ui-router.git#~
    0.2.10
    )

    Are there more packages that I need to update? If not, do I just pick up from “Set up a MongoDB database:”

  • Denny
    Reply

    I got to “Create a MEAN app” and I got the following error after `yo meanjs`.
    bower retry Request to https://bower.herokuapp.com/packages/angular fail
    ed with ETIMEDOUT, retrying in 31.5s
    bower ETIMEDOUT Request to https://bower.herokuapp.com/packages/angular-sani
    tize failed: connect ETIMEDOUT

    npm ERR! [email protected] postinstall: `bower install –config.interactive=false
    `
    npm ERR! Exit status 1
    npm ERR!

    I did a google search and did the following:
    set http_proxy=’proxyserver’
    set https_proxy=’proxyserver’

    That didn’t seem to do anything. What do I do now?

    • bossable

      Hey Denny – that’s an odd message, the good news is that if you’ve gotten all the way through to the Bower install, then you’re almost at the end.

      With your command line pointing to the folder that your app has been installed in, try putting this line in your command line (without the $):

      $ bower update

    • Denny

      I forgot to mention earlier that I have GIT. So the ‘$’ is fine with me. Anyway, I tried the bower update command and I still got the same type EMI ME DO UT messages I mentioned earlier. I thought that since I’m using a corporate PC, I would be behind a proxy. However, my workaround for setting the proxyserver didn’t work.
      Any other ideas on what I could do?

    • bossable

      Hey Denny – a few things that I would try:
      1. Make sure you have a recent version of Node and Bower.
      2. Try and install the bower packages individually:
      First find the bower.json file, and try and install each package individually, using ‘$ bower update (packagename)’
      3. If you’re still having trouble, then try and install the individual packages using npm
      https://www.npmjs.org/search?q=angular