These are chat archives for AngularClass/NG6-starter

Nov 2015
Tai T. Truong
Nov 11 2015 08:21

I have used bower install components. I have modified webpack.config.js with:

{ test: /\.js$/, exclude: /(node_modules|bower_components)/, loader: 'babel', },

and I run 'gulp' with error:

ERROR in ./client/app/app.js
Module not found: Error: Cannot resolve module 'angular' in E:\project\client\app
 @ ./client/app/app.js 5:15-33
Tai T. Truong
Nov 11 2015 09:31

@fesor . I have modified follow your link. Error:

Uncaught TypeError: _angular2.default.module is not a function(anonymous function) 
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.


import angular from 'angular';
import uiRouter from 'angular-ui-router';

angular.module('app', [
Sergey Protko
Nov 11 2015 09:39
have you made angular and uiRouter as external dependencies? i.e. webpack ignores this modules? From what i see, webpack just didn’t bundle angular, but you have angular added manually.
Tai T. Truong
Nov 11 2015 09:43
@fesor , yes.
Sergey Protko
Nov 11 2015 09:44
well… now webpack can’t help you to resolve some of this dependencies and you should solve this yourself (move angular and ui router to head section for example).
Tai T. Truong
Nov 11 2015 09:47
Have you do any example for this?