ng2 packages not compatible with Angular Ivy [duplicate]

Discussão em 'Angular' iniciado por borosboyo, Janeiro 21, 2025.

  1. borosboyo

    borosboyo Guest

    I tried updating the company project from Angular v14 to Angular v18, but some packages, mainly ng2-completer, angular2-text-mask, ng2-date-picker, ng2-charts giving me errors and I am unable to persist them. I tried to update every relevant package to the latest compatible version.

    My package.json:

    "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "mocked": "ng serve -c mocked",
    "build": "ng build",
    "test": "ng test",
    "test:watch": "ng test —-watch",
    "test:ci": "ng test --runInBand",
    "test-headless": "ng test --watch=false --browsers=ChromeHeadless",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "compodoc-static": "./node_modules/.bin/compodoc -p src/tsconfig.app.json",
    "compodoc-online": "./node_modules/.bin/compodoc -p src/tsconfig.app.json -w -s"
    },
    "private": true,
    "dependencies": {
    "@angular/animations": "^18.2.13",
    "@angular/common": "^18.2.13",
    "@angular/compiler": "^18.2.13",
    "@angular/core": "^18.2.13",
    "@angular/forms": "^18.2.13",
    "@angular/platform-browser": "^18.2.13",
    "@angular/platform-browser-dynamic": "^18.2.13",
    "@angular/router": "^18.2.13",
    "@fortawesome/fontawesome-free": "^5.13.0",
    "@ng-bootstrap/ng-bootstrap": "18.0.0",
    "@ngx-translate/core": "16.0.4",
    "@ngx-translate/http-loader": "^6.0.0",
    "angular2-text-mask": "^9.0.0",
    "bootstrap": "5.3.3",
    "chart.js": "^2.9.4",
    "date-fns": "^2.16.1",
    "file-saver": "^2.0.5",
    "jquery": "^3.4.1",
    "jquery-sticky": "^1.0.4",
    "js-joda": "^1.11.0",
    "js-joda-timezone": "^2.1.1",
    "moment": "^2.29.1",
    "ng2-charts": "^2.4.2",
    "ng2-completer": "^9.0.1",
    "ng2-date-picker": "^11.0.0",
    "ng2-nouislider": "2.0.0",
    "ngx-pagination": "6.0.3",
    "ngx-smart-modal": "14.0.3",
    "ngx-spinner": "17.0.0",
    "ngx-translate-multi-http-loader": "^3.0.0",
    "nouislider": "^14.6.3",
    "@popperjs/core": "2.11.7",
    "rxjs": "6.5.5",
    "signature_pad": "^3.0.0-beta.4",
    "text-mask-addons": "^3.8.0",
    "tslib": "^2.0.0",
    "xlsx": "0.18.5",
    "xlsx-style": "^0.8.13",
    "zone.js": "~0.14.10"
    },
    "devDependencies": {
    "@angular-builders/jest": "^10.0.1",
    "@angular-devkit/build-angular": "^18.2.12",
    "@angular-devkit/core": "^18.2.12",
    "@angular/cli": "^18.2.12",
    "@angular/compiler-cli": "^18.2.13",
    "@angular/language-service": "^18.2.13",
    "@angular/localize": "^18.2.13",
    "@ngneat/spectator": "^6.1.2",
    "@types/bootstrap": "4.3.1",
    "@types/jest": "^26.0.16",
    "@types/jquery": "^3.3.35",
    "@types/node": "^13.13.2",
    "codelyzer": "^6.0.0",
    "jest": "^29.7.0",
    "jest-when": "^3.0.1",
    "mockserver-client": "^5.10.0",
    "mockserver-node": "^5.10.0",
    "ng-mocks": "^14.0.0-alpha",
    "ng-packagr": "^18.2.1",
    "protractor": "~7.0.0",
    "ts-node": "~8.9.0",
    "tslint": "~6.1.0",
    "typescript": "5.5.4"
    }


    Error Stacktrace

    ** This likely means that the library (ng2-completer) which declares Ng2CompleterModule 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. **

    Are there any solutions to this problem or do I have to try alternatives for all of them? (Or be content with upgrading to an older version of Angular)

    I tried looking for suitable versions but the packages in package.json seem to be the latest version.

    Continue reading...

Compartilhe esta Página