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 Model from 'ember-data/model' doesn't work #4075

Closed
bmac opened this issue Jan 13, 2016 · 3 comments
Closed

import Model from 'ember-data/model' doesn't work #4075

bmac opened this issue Jan 13, 2016 · 3 comments

Comments

@bmac
Copy link
Member

bmac commented Jan 13, 2016

Unless you also import ember-data.

rwjblue [2:20 PM]
basically there are some side effects that happen upon importing ember-data

​[2:21]
yep

​[2:21]

doesn't get ran if you import Model from 'ember-data/model';

GitHub
emberjs/data
A data persistence library for Ember.js.
(edited)

​[2:21]
@bmac: thoughts on ^^?

​[2:21]
@atimberlake: add import "ember-data"; to app/app.js for now to fix your app code

atimberlake [2:22 PM]
@rwjblue: Thanks, will do

rwjblue [2:22 PM]
I wonder if there is a specific reason we .reopen there instead of provide a mixin that Model can include

atimberlake [2:23 PM]
Thanks, all working again

bmac [3:23 PM]
@rwjblue: sounds like model should be importing relationships/ext

rwjblue [3:24 PM]
@bmac: it should import a mixin from there(edited)

​[3:24]
but if model imports it for side effects, then you have a circular dep and Model will be undefined in relationships/ext

bmac [3:31 PM]
makes sense

@bmac
Copy link
Member Author

bmac commented Jan 18, 2016

Closed by #4091

@bmac bmac closed this as completed Jan 18, 2016
@MattNguyen
Copy link

After upgrading to 2.3.3, we still need to add import ember-data in app/app.js. #4091 was supposed to resolve this, correct?

@bmac
Copy link
Member Author

bmac commented Jan 29, 2016

@MattNguyen That is correct what error are you seeing?

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

No branches or pull requests

2 participants