Ember pre-render: TypeError: 'undefined' is not a function (rating "u.bind (e)")

I am trying to create a pre-render server for my ember application.

I installed ember-prerender ( https://github.com/zipfworks/ember-prerender ), used the initializers presented in the example, deployed it to one of my servers.

But when I try to run it,

 [Renderer 0] Engine starting up (phantom) [Renderer 0] Restarting rendering engine in 25000 seconds after it failed with error: Phantom encountered an error: TypeError: 'undefined' is not a function (evaluating 'u.bind(e)') 

I'm not sure where to look. I tried:

  • Removing all third-party SDKs (Facebook, Google Analytics)
  • Writing various pieces of code (the XContentReady event XContentReady )
  • Starting with the jsdom engine instead of phantom (gives: [Renderer 0] Restarting renderer, timed out while initializing )
  • Production attempt

I don’t know where to look too. The worst part is that I worked a few days ago (see Ember pre-render: timeout on initialization )

EDIT:

I don't think the problem has anything to do with the code, since I did a hard reset for the version that worked.

  • Perhaps some version has been changed (bower, npm, phantom)? I tried updating bower to 1.6, without success.
  • Perhaps I have new dependencies that are causing the problem? I don't understand how though

EDIT2: I started working on the new server, now I get a Phantom message with this error message:

 [Renderer 0] Restarting rendering engine in 25000 seconds after it failed with error: Erroneous exit code: null SIGSEGV 

If I use JSDOM, I still get Restarting renderer, timed out while initializing

EDIT 3: I tried to include polyfill in my application. Using:

  • github.com/es-shims/es5-shim
  • then as an addon: github.com/pixelhandler/ember-cli-es5-shim

Without success

EDIT 4: I have the same error with a completely new project containing only ember-prerender, so I think it is either related to my specific build ( version: 1.13.13, node: 0.12.3, npm: 2.14.10, os: linux x64 ), or my computer packages / configuration.

+5
source share
1 answer

I have no experience with jsdom, but Function.prototype.bind not supported phantomjs@1.9 and below. Have you tried phantomjs@2.0 ?

+1
source

Source: https://habr.com/ru/post/1236710/


All Articles