I have followed the Tutorial. After changing app/maint.ts in the Http chapter I get the error when starting the app via command line:
ap
If you are using angular cli, you would get this error.
Please add 'angular2-in-memory-web-api' in the const barrels in the system-config.ts file as below:
const barrels: string[] = [
// Angular specific barrels.
'@angular/core',
'@angular/common',
'@angular/compiler',
'@angular/forms',
'@angular/http',
'@angular/router',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
// Thirdparty barrels.
'rxjs',
'angular2-in-memory-web-api',
// App specific barrels.
'app',
'app/shared',
/** @cli-barrel */
];
And add 'angular2-in-memory-web-api': 'vendor/angular2-in-memory-web-api' as below.
System.config({
map: {
'@angular': 'vendor/@angular',
'rxjs': 'vendor/rxjs',
'main': 'main.js',
'angular2-in-memory-web-api': 'vendor/angular2-in-memory-web-api'
},
packages: cliSystemConfigPackages,
});
Rebuild using npm start. This resolved the issue for me.