Uncaught ReferenceError: angular is not defined - Mean.IO

jack.the.ripper picture jack.the.ripper · Apr 30, 2014 · Viewed 20.3k times · Source

I have followed the steps to install mean.io, but when I browse the localhost:3000 I get a blank page and when I open the console I get a list of files pointing to the same error:

Uncaught ReferenceError: angular is not defined

my issue is something similar to this, but I re-installed bower and it didn't work I'm still getting the error.

I'm trying to install this in ubuntu 14.04

this is the screen I get:

Uncaught ReferenceError: angular is not defined

Do I need to perform some sort of modification to any script, file reference or configuration, any suggestions?

Answer

Christian Cruz picture Christian Cruz · May 2, 2014

I had the same problem and I solved in this way:

You need to install or reinstall "bower"

Check your bower.json file, it should look something like this:

{
"name": "mean",
"version": "0.3.0",
"dependencies": {
    "angular": "latest",
    "angular-resource": "latest",
    "angular-cookies": "latest",
    "angular-mocks": "latest",
    "angular-route": "latest",
    "bootstrap": "latest",
    "angular-bootstrap": "0.10.0",
    "angular-ui-router": "#master"
  }
}

and then run the following command:

  sudo bower install --allow-root

This will install to "Angular" in the project