-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Uncaught ReferenceError: DS is not defined #3219
Comments
try setting it to beta.19 in your bower.json? |
window.DS seems to get defined in globals mode so I'm a bit confused here, as the addon should just load that. |
I was going to try that either have both a 18 or 19. Why are they different though? The bower package hasn't been updated? |
window.DS is undefined. |
Bower should be updated. |
This is what the bower installation shows though https://gist.github.com/jrm2k6/b3292b624ea33ebd23cd Something interesting in there? I chose the second option both time. |
Does changing both package.json and bower.json to beta.18 make a difference? also running |
I tried already both 18. Will try again. But it didn't make a difference EDIT: still the same. |
Are you sure you're not getting any other errors in your DevTools console? |
Also if the stack is available for your current error that would be great as well. |
I just generate a new project, and it seems to be working with beta-18/beta-19 for both. I don't know why it doesn't work in my other project though. It could be because in my other project (which is basically a laravel project, the initialization of the project got messed up for some reason)? I am also wondering why it asked me to chose a version of ember/ember-data
Still no luck in my current project, which is REALLY frustrating. |
Moving the ember app out of the laravel project doesn't change a thing. Trying to experiment to see if another package could cause this? Creating a new ember app from scratch and requiring ember-data does work. |
The issue is with this package https://github.com/unionups/ember-cli-bootstrap-sass. Removing it works and DS is required correctly. |
I don't use model: `import DS from 'ember-data'`
User = DS.Model.extend {
email: DS.attr('string')
}
`export default User` route: `import User from 'frontend/models/user'` In console: code in vendor.js: define('ember-data', [], function() {
"use strict";
return {
'default': DS
};
});
})(); Error caught in Any thoughts? |
Are you using some specific package? U would try to run the node REPL and
|
I have run into the same issue here. I am using "Ember@2.0.0-beta.1" and "Ember-cli@0.2.7" When I have Uncaught TypeError: Cannot read property 'indexOf' of undefined(anonymous function) @ adapter.js:486(anonymous function) @ main.js:131
app-shims.js:15Uncaught ReferenceError: DS is not defined When I have Uncaught TypeError: Cannot read property 'indexOf' of undefined(anonymous function) @ fixture-adapter.js:10(anonymous function) @ main.js:130
app-shims.js:15Uncaught ReferenceError: DS is not defined Different errors on different version. Trying to remove one package at the time is not ideal since app requires most of them. I have to remove the related code to avoid other errors as well. Any thoughts? |
@mattma I agree that removing one package at a time is annoying. What I would do in your case, to rule-out an issue caused by another package is to create a new project, and add the same package as you have one by one. That is my only idea so far. |
After play around for an hour, I think the issue is coming from "Ember" core. There is nothing broken or need-to-be-fixed in Ember-data side. Or any other npm modules or ember-cli dependencies. simply switch to a different version of Ember-core in "bower.json", then run 'bower install'. You should have a working app. Then switch back to a latest "Ember@2.0.0-beta.1". run "bower install". Now you should have a latest greatest working app with latest "Ember-data@1.0.0-beta.19.2". I believe when running "bower install", the dependencies order have been messed up. Confirmed that "Ember@2.0.0-beta.1+bc58a125" and "Ember@2.0.0-beta.1+169a5d2aed" works fine. Got this "bower install" message, due to the versioning issue. I believe it is the thing of 2.0.0. DS resolved to a different version cause the breakage Please note that,
XXX depends on ember#beta which resolved to ember#169a5d2aed
ember-resolver#0.1.17 depends on ember#> 1.5.0-beta.3 which resolved to ember#1.13.0
ember-cli-shims#0.0.3 depends on ember#>=1.4 <2 which resolved to ember#1.13.0
ember-simple-auth#0.8.0-beta.3 depends on ember#>=1.2 which resolved to ember#1.13.0
ember-data#1.0.0-beta.19.2 depends on ember#>= 1.8.1 < 2.0.0 which resolved to ember#1.13.0
Resort to using ember#beta which resolved to ember#169a5d2aed
Code incompatibilities may occur. |
@mattma Is correct. Ember Data does not currently work with Ember 2.0 beta. Ember has removed some deprecated IE8 support code in the Ember 2.0 branch that Ember Data was relying on for IE8 support. In the next few days there will be an Ember Data 2.0 beta release that is compatible with the current Ember 2.0 beta. |
@bmac Thank you for the confirmation. I cannot wait to use Ember Data 2.0 beta release. Mainly because I am on the alpha wagon and ready for the latest 2.0 one way binding goodness. Is there an ETA on the release date? |
I'm getting the same problem with Ember 1.13.2 + Ember Data beta 1.0.0-beta19.1. I can't upgrade Ember Data yet because I'm blocked by this bug. |
@visoft. Is there another error on the page before the "DS is not defined"? |
Nope, just that error. |
npm ember-data 1.0.0-beta.19
bower ember-data 1.0.0-beta.18
ember-cli 0.2.7
ember 1.12.0
Error: Uncaught ReferenceError: DS is not defined
I tried to uninstall/reinstall the bower and npm packages. What should I try now?
The text was updated successfully, but these errors were encountered: