Ember 1.4.0 to Ember 1.13 Upgradation error

I’m upgrading the code from Ember 1.0.4 to Ember 1.13. When I’m execute the below code using ember 1.13 I’m getting the error

RenderResult.build = function (env, scope, template, options, contextualElement) {
   var dom = env.dom;
   var fragment = getCachedFragment(template, env);
   var nodes = template.buildRenderNodes(dom, fragment, contextualElement);

   var rootNode, ownerNode, shouldSetContent;

   if (options && options.renderNode) {
     rootNode = options.renderNode;
     ownerNode = rootNode.ownerNode;
     shouldSetContent = true;
   } else {
     rootNode = dom.createMorph(null, fragment.firstChild, fragment.lastChild, contextualElement);
     ownerNode = rootNode;
     initializeNode(rootNode, ownerNode);
     shouldSetContent = false;

I’m getting the below error while execute the code.

 Uncaught TypeError: template.buildRenderNodes is not a function
   at Function.RenderResult.build (core.js:9567)
   at render (core.js:9553)
   at core.js:10465
   at renderAndCleanup (core.js:10470)
   at Object.block [as default] (core.js:10464)
   at yield (core.js:9495)
   at handleKeyword (core.js:9470)
   at handleRedirect (core.js:9469)
   at Object.inline (core.js:9481)
   at Object.content (core.js:9349)

template.buildRenderNodes is not accepting as a function after upgrade from ember 1.4.0 to 1.13. Provide some suggestion.

The issue here is that you’re using really really old private api. There isn’t going to be a simple solution to this. The only thing you can do is rewrite that part of your app to use non-private api, and this will look completely different to how it does now.

1 Like