I've been checking out the Angular 2 Routing and Navigation example provided in this link: https://plnkr.co/edit/I4ArEQTniO7MJtfzpBWl?p=info.
Upon running the transpiler, I encountered an error message stating: "client/app/app.module.ts(5,41): error TS2307: Cannot find module '@angular/platform-browser/animations'."
Referring to my systemjs.config.js (as displayed below), I expected the module '@angular/platform-browser/animations' to be located in the file "platform-browser-animations.umd.js" within node_modules/@angular/platform-browser/bundles, but it's not present.
//systemjs.config.js
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'app',
'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
...
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
...
}
});
})(this);
Trying to resolve by installing the missing frameworks through npm resulted in an unmet dependency error message:
+-- UNMET PEER DEPENDENCY @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="89eae6e4e4e6e7c9bba7bda7b1">[email protected]</a>
...
Even after attempting to install the required versions of the dependencies, the same unmet dependency issue persisted.
...It seems that the problem might be related to the animations version. If so, how can I uninstall the current version and which compatible version should I install given the @angular/core version I have, 2.4.8? If this isn't the root cause, how do I go about installing the missing file, @angular/platform-browser/bundles/platform-browser-animations.umd.js?