carbon-design-system / carbon-components-angular

An Angular implementation of the Carbon Design System for IBM.
https://angular.carbondesignsystem.com
Apache License 2.0
529 stars 301 forks source link

Angular problem when upgrade form 14 to 18: toPromise it not found #2940

Closed zosmf-Mira closed 2 months ago

zosmf-Mira commented 2 months ago

Detailed description

Describe in detail the issue you're having. when I upgrade angular from 14 to 18, it return error "./src/app/zmf-diagnostics/service/logLevel.service.ts:2:0-37 - Error: Module not found: Error: Package path ./add/operator/toPromise is not exported from package /Users/yuanyuan/Documents/GitHub_UI/zmfui_diagnosis/node_modules/rxjs (see exports field in /Users/yuanyuan/Documents/GitHub_UI/zmfui_diagnosis/node_modules/rxjs/package.json)" in my project.

logLevel.service.ts is created by me and it work well before, I am not sure why not found "./add/operator/toPromise" which is not defined from my side.

Could you please help address it? As it is block our project, so if you could address it ASAP I'll very appreciate!

below is my environment. { "name": "diagnosticsassistant", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "pkg-build": "ng build diagnosticsassistant --base-href /zosmf/diagnostics/dist/", "xdeploy": "chmod 755 xdeploy.sh && xdeploy.sh", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^18.1.0", "@angular/cdk": "^18.1.0", "@angular/common": "^18.1.0", "@angular/compiler": "^18.1.0", "@angular/core": "^18.1.0", "@angular/forms": "^18.1.0", "@angular/material": "^18.1.0", "@angular/platform-browser": "^18.1.0", "@angular/platform-browser-dynamic": "^18.1.0", "@angular/router": "^18.1.0", "@carbon/colors": "^11.14.0", "@carbon/elements": "^11.22.0", "@carbon/grid": "^11.13.0", "@carbon/icons": "^11.44.1", "@carbon/layout": "^11.13.0", "@carbon/motion": "^11.10.0", "@carbon/styles": "^1.60.1", "@carbon/themes": "^11.18.0", "@ngx-translate/core": "^15.0.0", "@ngx-translate/http-loader": "^8.0.0", "@types/file-saver": "^2.0.5", "carbon-components": "^11.48.1", "carbon-components-angular": "^5.27.3", "file-saver": "^2.0.5", "jquery": "^3.6.0", "karma-coverage": "^2.2.0", "rxjs": "^7.8.1", "rxjs-compat": "6.6.7", "tslib": "^2.6.3", "zmf-common": "git+https://ddfe8970bb4fcfec305a7eb1e5bea699817d3b36:x-oauth-basic@github.ibm.com/zosdev/zmfui_common.git", "zone.js": "^0.14.7" }, "devDependencies": { "@angular-devkit/build-angular": "^18.1.0", "@angular/cli": "^18.1.0", "@angular/compiler-cli": "^18.1.0", "@angular/language-service": "^18.1.0", "@types/jasmine": "^5.1.4", "@types/jasminewd2": "^2.0.13", "@types/node": "^20.14.11", "codelyzer": "^6.0.2", "jasmine-core": "^5.1.2", "jasmine-spec-reporter": "^7.0.0", "karma": "^6.4.3", "karma-chrome-launcher": "^3.2.0", "karma-coverage-istanbul-reporter": "^3.0.3", "karma-jasmine": "^4.0.2", "karma-jasmine-html-reporter": "^2.1.0", "protractor": "^7.0.0", "ts-node": "^10.9.2", "tslint": "^6.1.3", "typescript": "^5.5.3" }, "browserslist": [ "> 0.5%", "last 2 versions", "Firefox ESR", "not dead", "not IE 9-11", "not ios_saf 15.2-15.3" ] }

Is this a feature request (new component, new icon), a bug, or a general issue?

Is this issue related to a specific component?

What did you expect to happen? What happened instead? What would you like to see changed?

What browser are you working in?

What version of the Carbon Design System are you using?

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

Steps to reproduce the issue

  1. Step one
  2. Step two
  3. Step three
  4. etc.

Additional information

zosmf-Mira commented 2 months ago

change rxjs version, fixed.