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

Import fetch from 'fetch' not working w/ 1.4.0 #26

Closed
nickschot opened this issue Apr 12, 2017 · 6 comments · Fixed by #27
Closed

Import fetch from 'fetch' not working w/ 1.4.0 #26

nickschot opened this issue Apr 12, 2017 · 6 comments · Fixed by #27

Comments

@nickschot
Copy link

Doing import fetch from 'fetch' throws a ember.debug.js:18015 Error: Could not find module 'fetch' on 1.4.0. Works fine on 1.3.0

  • Ember-Cli 2.12.1 w/ latest dependencies
  • Node 7.4.0
ef4 added a commit to ef4/ember-fetch that referenced this issue Apr 12, 2017
This fixes ember-cli#26. ember-network provides a file named vendor/fetch.js, which can overwrite the one that comes from this addon.

Why would you have both ember-network and ember-fetch? In my case it was because ember-simple-auth was pulling in ember-network without my realizing.
@ef4
Copy link
Contributor

ef4 commented Apr 12, 2017

Can you check if your app has ember-network in its dependencies? npm ls | grep ember-network

If so I think #27 solves this.

@nickschot
Copy link
Author

Not explicitly, it seems that ember-simple-auth included ember-network as a dependency.

From #21 I chose ember-fetch instead of ember-network for my own needs.

Thanks for the quick fix guys!

@ef4
Copy link
Contributor

ef4 commented Apr 12, 2017 via email

@nickschot
Copy link
Author

@ef4 and maybe fastboot too? Just stumbled upon the guide: https://ember-fastboot.com/quickstart

@BlueRaja
Copy link

BlueRaja commented Jul 12, 2017

We are seeing this issue in a large Fastboot project, running the latest version (3.2.8), with no dependencies running ember-network. Reverting to 1.3.0 does fix the issue. No idea how to even debug this.

@ef4
Copy link
Contributor

ef4 commented Jul 12, 2017

@BlueRaja this bug was fixed in ember-fetch version 1.4.2. If you are on that version or newer, please open a separate issue.

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

Successfully merging a pull request may close this issue.

3 participants