I am using es6 syntax in my angular JS project but it throws error when run gulp build
, search over github and So but some saying this is error due to gulp uglify w
I after struggling for a while i managed to fixed this issue by replacing all ^ by ~ from the all the dependencies in package.json
file.
Replace
"dependencies": {
"@agm/core": "^1.0.0-beta.5",
"@angular/animations": "^7.2.0",
"@angular/common": "^7.2.0",
"@angular/compiler": "^7.2.0",
"@angular/core": "^7.2.0",
"@angular/forms": "^7.2.0",
...
},
To
"dependencies": {
"@agm/core": "~1.0.0-beta.5",
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
...
},
I think this issue is because of conflict between different version of libraries.