Closed danny-swimmer closed 7 years ago
I think the problem is that you forget to add @angular/animations to package.json
I think you'll need to upgrade to Angular 4.0.0-x to use new animations and PrimeNG 4.0.0-rc.1.
Thanks @nick1247 and @digitalcraftco. I added "@angular/animations": "4.0.0-rc.3" to package.json, and that got rid of the "Could not resolve @angular/animations" error. However now I'm getting a different error when I run "ng build --prod": ERROR in Cannot read property 'stateChangeExpr' of null
This is not related to PrimeNG so closing.
Hi @cagataycivici,
Perhaps the root cause of this issue is not inside PrimeNG. However the result is that I can't upgrade to PrimeNG 4.0.0-rc.1 - I'm stuck at PrimeNG 2.0.2. Obviously there was some change between v2.0.2 and v4.0.0-rc.1 which at least exposed a bug somewhere else. It would be helpful if you could at least suggest what I need to change, so that I can upgrade to PrimeNG 4.0.0-rc.1. Thanks.
If you are on Angular 2, you need to use PrimeNG 2.x, like today's 2.0.4 release.
I had the same problem, which was solved by adding @angular/animations to package.json as suggested by @nick1247
where exactly in package.json we need to add
I am geting this error Failed to compile.
./primeng/components/accordion/accordion.js Module not found: Error: Can't resolve '@angular/animations' in 'D:\Git-Repo\trianz-studio\node_modules\primeng\components\accordion' @ ./~/primeng/components/accordion/accordion.js 13:19-49 @ ./~/primeng/primeng.js @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
Hi all I have just upgraded to angular4.0.1 and I have run into the described problem with primeng. From what I could see, angular animations is NOT a required part of angular at this stage. Adding the reference to @angular/animations is the solution to get primeng to work, but it was not specified anywhere. Could I recommend adding the required angular packages as separate dependencies to the documentation to make it clearer what the angular requirements are? I think especially people upgrading from 2 to 4 will keep running into this problem and we could help them by making a slight adjustment to the doc.
Cheers
Ben
Hi @pratik-trianz
I added @angular/animations
to package.json under dependencies
as follows:
"dependencies": {
"@angular/animations": "^4.0.0",
...
}
You could also install via npm:
npm install @angular/animations --save
I have "@angular/animations": "^4.0.1"
and "primeng": "^4.0.0-rc.2"
but I still get the error.
I tried all the suggested solution here but still im getting error which is related to primeNG. I just tried to use primeNG schedule to another branch but it gives me an error so when I switch to the branch that im working with, now i have the same error. i did not merge it
You can Just update your package using npm
npm install primeng@4.3.0
I'm submitting a ... (check one with "x")
Current behavior In my angular 2 project, I upgraded primeng this morning from version 2.0.2 to 4.0.0-rc.1. When I run "ng build --prod", I get these errors: ERROR in Error encountered resolving symbol values statically. Could not resolve @angular/animations relative to