This blog resolves the problem of dealing with the version conflicts in Angular (Ex: You have installed angular 6 and for instance you come across a situation where you would like to run an angular project developed in Angular 5 without removing the global version of Angular 6).

Here is the procedure to resolve the issue:
Solution 1:
1)install npm i node-sass (OR) install npm i node-sass@[version]
Ex: install npm i node-sass@4.8.1(Note: 4.8.1 is a version of node-sass, you can put your version of the project to be executed)
2)npm add @angular/cli@[version] –save-dev
Ex: npm add @angular/cli@1.7.4 –save-dev (Note: 1.7.4 is the version to install Angular 5).

Solution 2:
1)For sass problem:
install npm i node-sass (OR) install npm i node-sass@[version]
Ex: install npm i node-sass@4.8.1(Note: 4.8.1 is a version of node-sass, you can put your version of the project to be executed)
2)For Undefined is not a function follow this procedure:
a)npm remove -g @angular/cli
b)npm install -g @angular/cli@[version]
Ex: npm install -g @angular/cli@1.7.4 (Note: 1.7.4 is the version to install Angular 5)
c)npm remove @angular/cli
d)npm add @angular/cli@[version] –save-dev
Ex: npm add @angular/cli@1.7.4 –save-dev (Note: 1.7.4 is the version to install Angular 5).

Leave a Reply

Your email address will not be published. Required fields are marked *