I've inherited an Ember application at v1.8.1. I have successfully upgraded the application to v.1.9.1, and would like to continue to update it to at least v1.13.8.
In my v1.10.1 build, it appears that the ember-template-compiler is not quite meshing with Ember and am getting the following errors in the console:
Uncaught SyntaxError: Unexpected token export
Uncaught TypeError: Cannot read property 'name' of undefined
The line erroring for the 'name' error is:
set(appController, 'currentRouteName', infos[infos.length - 1].name);
infos is empty... so it doesn't have an object to call name on.
I'm looking for some direction in how to better track down the error, and what needs to be done to successfully upgrade.
The project is using broccoli (but not ember cli), so i'm trying to make the ember-cli-htmlbars plugin work.
Is there a better way to compile HTMLBars for Ember v1.10.1?
Should I transition the project over to Ember cli?
Please let me know what code you need would need to see.
Related
I'm upgrading a project from 3.26 to 3.27 using ember-cli-update, and then this error started happening, As I could see the error is raised when we try to access some method inside #ember/computed like alias. The first time the error occurred was here
I just commented the line to test and the same error occurred in another addon. So it's not related to the addon but something in the project
My ember-cli version is 0.2.3. I am getting the following error when I try to run tests.
TypeError: Attempting to register an unknown factory: `controller:object`
at Object.Registry.register (http://localhost:7357/assets/vendor.js:12208:15)
at Object.container.(anonymous function) [as register] (http://localhost:7357/assets/test-support.js:1905:44)
at Object.isolatedContainer [as default] (http://localhost:7357/assets/test-support.js:1946:15)
at exports.default.klassy.Klass.extend._setupIsolatedContainer (http://localhost:7357/assets/test-support.js:2406:52)
at exports.default.klassy.Klass.extend.setupContainer (http://localhost:7357/assets/test-support.js:2312:14)
at nextStep (http://localhost:7357/assets/test-support.js:2300:53)
at exports.default.klassy.Klass.extend.invokeSteps (http://localhost:7357/assets/test-support.js:2305:14)
at exports.default.klassy.Klass.extend.setup (http://localhost:7357/assets/test-support.js:2275:19)
at Object.qunit.module.setup (http://localhost:7357/assets/test-support.js:1814:16)
at runHook (http://localhost:7357/assets/test-support.js:3534:20)
Any idea on what might be causing this? Looking like a ember-cli internal issue.
I am actually using v2.3.0-beta.2 of Ember CLI. When you fire it up, it displays v0.2.3 on terminal for some reason.
Ember version is 2.0.
I have a unit test for a model that triggers this. The test is using moduleFor rather than moduleForModel as my app doesn't use Ember Data.
I am actually using v2.3.0-beta.2 of Ember CLI. When you fire it up, it displays v0.2.3 on terminal for some reason.
This happens because your globally installed Ember CLI is different from the version specified in the project's package.json.
What Ember CLI does when you run a command if check if it's inside an Ember project. It does this by checking for a package.json file in the current, or parent, directory. If it finds it, it will then delegate the command to the Ember CLI that your project depends on.
This is done to make sure that the commands (generate, build, etc) called are the right version and won't break your application.
After installing ember-components via bower, I'm trying to use it;
depending on the component I get different errors;
for example if I try to use the tab component (simple version), I get this:
Assertion Failed: `blockHelperMissing` was invoked without a helper name, which is most likely due to a mismatch between the version of Ember.js you're running now and the one used to precompile your templates. Please make sure the version of `ember-handlebars-compiler` you're using is up to date.
Error: Assertion Failed: `blockHelperMissing` was invoked without a helper name, which is most likely due to a mismatch between the version of Ember.js you're running now and the one used to precompile your templates. Please make sure the version of `ember-handlebars-compiler` you're using is up to date.
With other components (such as accordion) I get errors like this:
Uncaught Error: <App.ItaHomeView:ember360> Handlebars error: Could not find property 'em-accordion' on object <App.HomeController:ember408>.
I'm using Ember 1.7.0, with handlebars 1.3.0 and ember-components 0.2.0
Can anyone please explain what I am doing wrong?
I'm using the ember-rails gem and following along with the starter screencast on the Emberjs.com site. When I create this link
<li>{{#link-to 'about'}} About {{/link-to}}</li>
It's giving me this error
Uncaught Error: Handlebars error: Could not find property 'link-to' on object <(generated application controller):ember280>.
There's a StackOverflow question that deals with this issue Helpers not properly defined in application template?. One answer says that
When you use Handlebars.compile it uses the handlebars script instead
of the Ember script. Ember has its own handlebars object that extends
the original Handlebars object with extra templates.
and gives this example
Ember.TEMPLATES["application"] = Ember.Handlebars.compile("{{#linkTo 'dashboard'}}Dashboard{{/linkTo}}")
However, I'm unclear where to put that code, and would it need to be done for every link?
I suspect you're running an older version of ember. Try running this to get the latest version of Ember into your app.
rails generate ember:install --head
I have just downloaded ember-1.0.0-pre.4.js and ember-data-latest.js and get the following error upon the initialization of the app:
Uncaught TypeError: Object Ember.Application has no method 'registerInjection'
How can I fix this?
Unfortunately ember-data-latest.js on GitHub isn't up-to-date with Ember Pre 4. You'll have to git clone the Ember DS repository, and then build them using rake.
You can find it here or the minified version from here
you can get it from http://cdnjs.com/ concretely:
//cdnjs.cloudflare.com/ajax/libs/ember-data.js/0.8.0-latest20121123/ember-data-latest.min.js
//cdnjs.cloudflare.com/ajax/libs/ember-data.js/0.8.0-latest20121123/ember-data-latest.js