Thursday 8 June 2017

Stuck at [$injector:nomod] Module 'app' is not available

I seem to be a bit stuck here trying to setup my new app.

I tried:

import angular from 'angular';
var myApp = angular.module('myApp', []);

and I tried:

const angular = require('angular');
var myApp = angular.module('myApp', []);

I still keep getting

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:nomod] Module 'app' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.6.4/$injector/nomod?p0=app
    at eval (eval at <anonymous> (http://localhost:8080/app.bundle.js:322:1), 

I already installed angular with npm and this is from my package.json

  "dependencies": {
    "angular": "^1.5.0",
    "angular-route": "^1.6.4",
    "bootstrap": "^3.3.7"
  },

Any ideas?



via torbenrudgaard

No comments:

Post a Comment