Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observable.js depends on 'zen- observable'. CommonJS or AMD dependencies can cause optimization bailo uts. #7610

Closed
rajinder-yadav opened this issue Jan 23, 2021 · 4 comments

Comments

@rajinder-yadav
Copy link

Using Apollo Angular getting this warning.

Warning: /home/yadav/home/yadav/projects/websites/devmentor/node_modul
es/@apollo/client/utilities/observables/Observable.js depends on 'zen-
observable'. CommonJS or AMD dependencies can cause optimization bailo
uts.

My app is making use of async pipe to make a graphql query as shown in this write up:

https://apollo-angular.com/docs/data/queries#using-with-asyncpipe

package.json

{
  "name": "devmentor",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "db": "json-graphql-server db.js"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~11.0.9",
    "@angular/common": "~11.0.9",
    "@angular/compiler": "~11.0.9",
    "@angular/core": "~11.0.9",
    "@angular/forms": "~11.0.9",
    "@angular/platform-browser": "~11.0.9",
    "@angular/platform-browser-dynamic": "~11.0.9",
    "@angular/router": "~11.0.9",
    "apollo-angular": "^2.2.0",
    "rxjs": "~6.6.0",
    "tslib": "^2.0.0",
    "zone.js": "~0.10.2",
    "@apollo/client": "^3.0.0",
    "graphql": "^15.0.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1100.7",
    "@angular/cli": "~11.0.7",
    "@angular/compiler-cli": "~11.0.9",
    "@types/jasmine": "~3.6.0",
    "@types/node": "^12.11.1",
    "codelyzer": "^6.0.0",
    "jasmine-core": "~3.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "json-graphql-server": "^2.2.0",
    "karma": "~5.1.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "~4.0.2"
  }
}
@fkm
Copy link

fkm commented Jan 24, 2021

Seems to be related to #5961.

@hwillson
Copy link
Member

Let us know if this is still a concern with @apollo/client@latest - thanks!

@hiepxanh
Copy link

hiepxanh commented Jun 3, 2021


Warning: G:\small-cosmos\awread\node_modules\.pnpm\@apollo+client@3.3.19_graphql@15.5.0\node_modules\@apollo\client\utilities\observables\Observable.js depends on 'zen-observable'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I still have the same issue with 3.3.19 version

@benjamn
Copy link
Member

benjamn commented Jun 7, 2021

@hiepxanh AC3.4 is switching to zen-observable-ts, if you want to give @apollo/client@3.4.0-rc.4 a try?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants