Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

importing ember-ajax/errors is broken with ember-cli-typescript #437

Closed
sumeetattree opened this issue Mar 5, 2019 · 4 comments
Closed

Comments

@sumeetattree
Copy link

Checked against master. Trying to import { AjaxError } from 'ember-ajax/errors'; is broken while using ember-cli-typescript

ember: ~3.8.0
ember-cli: ~3.8.1
ember-ajax: ^4.0.2 and master
ember-cli-typescript: v2.0.0-rc2

Might be related to #428

@rwjblue
Copy link
Member

rwjblue commented Mar 5, 2019

Can you please define what specifically is broken? Does it not compile? Does it emit compilation warnings/errors? Does it compile but error at runtime?

@sumeetattree
Copy link
Author

Sorry my bad. It compiles just fine. But when the route tries to import, it errors at run time with

"Cannot import module from 'ember-ajax/errors'"

Only occurs with typescript. Otherwise it works just fine.

So here's a little bit of a background. I am trying to convert one of the in-repo-engine to use typescript. The base app and another in-repo-addon that hosts the shared code, are both written in Javascript. This shared addon is exposing ember-ajax.

When I try to compile and run with typescript I face #428 and this issue. While #428 seems to be resolved in master, this issue remains.

@boris-petrov
Copy link
Contributor

@sumeetattree - can you try ember-ajax version 5? I'm using also ember-cli-typescript and I don't have that problem.

@sumeetattree
Copy link
Author

Tested with 5.0.0. It is working. Thank you!

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

4 participants