'Animationsm.js Angular failed to compile / was not found
Since yesterday I'm having this errors when i try to serve my angular project.
./node_modules/@angular/platform-browser/fesm2015/animations.mjs:533:9-31 - Error: export 'ɵsupportsWebAnimations' (imported as 'ɵsupportsWebAnimations') was not found in '@angular/animations/browser' (possible exports: AnimationDriver, ɵAnimation, ɵAnimationEngine, ɵAnimationStyleNormalizer, ɵNoopAnimationDriver, ɵNoopAnimationStyleNormalizer, ɵWebAnimationsDriver, ɵWebAnimationsPlayer, ɵWebAnimationsStyleNormalizer, ɵallowPreviousPlayerStylesMerge, ɵcontainsElement, ɵinvokeQuery, ɵvalidateStyleProperty)
./node_modules/@angular/platform-browser/fesm2015/animations.mjs:533:69-88 - Error: export 'ɵCssKeyframesDriver' (imported as 'ɵCssKeyframesDriver') was not found in '@angular/animations/browser' (possible exports: AnimationDriver, ɵAnimation, ɵAnimationEngine, ɵAnimationStyleNormalizer, ɵNoopAnimationDriver, ɵNoopAnimationStyleNormalizer, ɵWebAnimationsDriver, ɵWebAnimationsPlayer, ɵWebAnimationsStyleNormalizer, ɵallowPreviousPlayerStylesMerge, ɵcontainsElement, ɵinvokeQuery, ɵvalidateStyleProperty)
Already searched for hours and hours and no solution looks to work with me.
I tried everything from:
Deleting the node_modules and package-lock.json + npm cache clean --force + npm i.
Even with npm i -force
Deleting and recloning the project from git and do the things above.
Nothing works.
Anyone had a similar problem?
Solution 1:[1]
I getting same error and after update Angular dependencies thi's working
(Error)
"@angular/animations": "^13.1.1",
"@angular/cdk": "^13.1.1",
"@angular/common": "~13.1.1",
"@angular/core": "~13.1.1",
"@angular/forms": "~13.1.1",
"@angular/material": "^13.1.1",
"@angular/platform-browser": "~13.1.1",
"@angular/platform-browser-dynamic": "~13.1.1",
"@angular/router": "~13.1.1",
(Working)
"@angular/animations": "^13.2.2",
"@angular/cdk": "^13.2.2",
"@angular/common": "~13.2.2",
"@angular/core": "~13.2.2",
"@angular/forms": "~13.2.2",
"@angular/material": "^13.2.2",
"@angular/platform-browser": "~13.2.2",
"@angular/platform-browser-dynamic": "~13.2.2",
"@angular/router": "~13.2.2",
Greetings
Solution 2:[2]
Ok, so in the end it was one of the interns that messed up with the original package.json -.-'
Good that i always keep old branches on git to be sure i recover things.
Question closed
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jeanfranco Cores Gonzalez |
| Solution 2 | Santosh |
