cloudinary / cloudinary_angular

Cloudinary Angular client library
MIT License
305 stars 228 forks source link

'CloudinaryModule' does not appear to be an NgModule class.(-996002) #318

Open carlmuluba opened 1 year ago

carlmuluba commented 1 year ago

Bug report for Cloudinary Angular SDK

Description of the bug.

CloudinaryModule import This likely means that the library (@cloudinary/angular-5.x) which declares CloudinaryModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

Issue Type

[X ] Build - Can’t install or import the SDK [ ] Babel - Babel errors or cross browser issues [ ] UI/Performance - Display or performance issues [ ] Behaviour - Functions aren’t working as expected (Such as generate URL) [ ] Documentation - Inconsistency between the docs and behaviour [ ] Incorrect Types [ ] Other (Specify)

Versions and Libraries

@cloudinary/angular-5.x - 1.5.3 Angular - 15.2.4 Node - 18.13.0 YARN - 1.22.19

Config Files (package.json)

{ "name": "angproj", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve --open", "build": "ng build", "watch": "ng build --watch --configuration development", "test": "ng test", "postinstall": "ngcc" }, "private": true, "dependencies": { "@angular/animations": "^15.0.0", "@angular/cdk": "15.1.5", "@angular/common": "^15.0.0", "@angular/compiler": "^15.0.0", "@angular/core": "^15.0.0", "@angular/flex-layout": "angular/flex-layout-builds", "@angular/forms": "^15.0.0", "@angular/material": "^15.1.4", "@angular/platform-browser": "^15.0.0", "@angular/platform-browser-dynamic": "^15.0.0", "@angular/router": "^15.0.0", "@cloudinary/angular-5.x": "^1.5.3", "@ng-select/ng-select": "^10.0.3", "@popperjs/core": "^2.11.6", "cloudinary-core": "^2.13.0", "ngx-cookie-service": "^15.0.0", "ngx-pagination": "^6.0.3", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.12.0" }, "devDependencies": { "@angular-devkit/build-angular": "^15.0.2", "@angular/cli": "~15.0.2", "@angular/compiler-cli": "^15.0.0", "@angular/localize": "^15.0.0", "@types/jasmine": "~4.3.0", "jasmine-core": "~4.5.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.0.0", "typescript": "~4.8.2" } }

michalkcloudinay commented 1 year ago

Hi @carlmuluba, I see that you are using the legacy package. Please try installing the latest version of the new SDK here: https://github.com/cloudinary/frontend-frameworks/tree/master/packages/angular, and let me know if it works as expected.

Thanks Michal

carlmuluba commented 1 year ago

Thank you @roeeba, solved by deleting node_modules and running yarn add, after...