I'm having some problems upgrading Ember to 1.9.1. Specifically, I believe it's not compiling my templates in such a way that is compatible with Handlebars 2.0. I've gathered this is a common problem, but the only solution that worked was using Ember canary rather than 1.9.1. Since that isn't an option, I need to find a way to make Handlebars 2.0 play nice with my upgraded app.
When I run my application, my console shows the error: Uncaught Error: Unknown template object: function
at this portion of handlebars.js:
if (!templateSpec || !templateSpec.main) {
throw new Exception('Unknown template object: ' + typeof templateSpec);
}
I upgraded my application by first switching to Ember CLI 0.1.5 from 0.1.2 using these instructions on the Ember CLI site. I then tried to upgrade Ember to 1.9.1 by first changing the Ember version in my bower.js to 1.9.1, then following these instructions on the official Ember site. That didn't work, so I tried using Ember canary instead of 1.9.1, and that worked fine.
Here is my package.js:
{
"name": "appName",
"version": "0.0.0",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember test"
},
"repository": "http://ift.tt/1aEiXdc",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"body-parser": "^1.2.0",
"broccoli-asset-rev": "^2.0.0",
"broccoli-merge-trees": "^0.1.4",
"broccoli-sass": "^0.2.1",
"broccoli-static-compiler": "^0.1.4",
"ember-cli": "0.1.5",
"ember-cli-content-security-policy": "0.3.0",
"ember-cli-dependency-checker": "0.0.7",
"ember-cli-esnext": "0.1.1",
"ember-cli-htmlbars": "^0.6.0",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.1.2",
"ember-cli-simple-auth": "^0.6.7",
"ember-cli-simple-auth-oauth2": "^0.6.7",
"ember-cli-spinkit": "0.0.1",
"ember-data": "1.0.0-beta.11",
"ember-export-application-global": "^1.0.0",
"express": "^4.8.5",
"glob": "^4.0.5"
}
}
Here is my bower.js:
{
"name": "appName",
"dependencies": {
"handlebars": "2.0.0",
"jquery": "^1.11.1",
"ember": "1.9.1",
"ember-data": "1.0.0-beta.12",
"ember-resolver": "~0.1.11",
"loader.js": "stefanpenner/loader.js#1.0.1",
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
"ember-qunit": "0.1.8",
"ember-qunit-notifications": "0.0.4",
"qunit": "~1.15.0",
"ember-simple-auth": "0.6.7",
"bootstrap-sass-official": "~3.3.1",
"ember-validations": "http://ift.tt/1uxZVUY"
}
}
Any ideas? StackOverflow questions I may have missed?
Aucun commentaire:
Enregistrer un commentaire