-
Notifications
You must be signed in to change notification settings - Fork 344
Error when building with v1.2.0: "@types/zen-observable/index has no default export" #511
Comments
I have the same issue, using create-react-app. |
Following this PR: DefinitelyTyped/DefinitelyTyped#23725, adding Maybe the right approach is to change how |
Same issue here! solution proposed by @yihuaf didn't work for us. |
This is currently our tsconfig.json file, does someone have an idea? |
I have the same issue. |
I have the same issue! |
Ok, we fixed the problem considering this ( https://stackoverflow.com/questions/43136859/angular-cli-ignores-tsconfig-json ) and adding the option allowSyntheticDefaultImports in the right file (tsconfig.app.json instead of tsconfig.json ) |
adding |
adding import * as Observable from 'zen-observable'; is better than import Observable from 'zen-observable'; to files: |
I added |
The reason for this problem is related to node_modules/apollo-link/lib/index.d.ts
node_modules/apollo-link/lib/link.d.ts
node_modules/apollo-link/lib/linkUtils.d.ts
node_modules/apollo-link/lib/types.d.ts They are using import Observable from 'zen-observable'; instead of import * as Observable from 'zen-observable'; |
By the way, this seems to be not only the latest version. I tried to roll back and the same problem is there as well. |
I don't think the namespace import ( |
I agree with @chenkie this issue is around v1.2.0 of apollo-link. If I force apollo-link to 1.1.0 - and set apollo-link-http to 1.3.3 (that's seems to be the last version of apollo-http-ling being compatible with apollo-link 1.2.0), everything works.
|
Intended outcome:
Build Angular CLI project with apollo-link. Looks like the latest release has issues with types/zen-observable
Actual outcome:
Got this error:
How to reproduce the issue:
Typical Angular CLI setup with apollo-client v2.2.5 and apollo-angular v1.0.1. Only happens with apollo-link v1.2.0
The text was updated successfully, but these errors were encountered: