tag:blogger.com,1999:blog-3356090267744964460.post884275963415042675..comments2023-04-08T16:36:47.449+02:00Comments on Chris Daniel: How to render image serverside using OpenShift Node.js?Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-3356090267744964460.post-17176851280388972982015-01-22T19:31:16.009+01:002015-01-22T19:31:16.009+01:00Hi Justin,
I hope to revalidate my blogpost over t...Hi Justin,<br />I hope to revalidate my blogpost over the weekend. I've looked at the code and I have following files:<br />.openshift/action_hooks/build with the content described in the blogpost (exports and canvas installing) and .openshift/action_hooks/pre_build which removes the cache:<br />rm -rf $OPENSHIFT_DATA_DIR/../app-root/repo/node_modules/*<br />rm -rf "${OPENSHIFT_NODEJS_DIR}/tmp/saved.node_modules"<br /><br />I think that pre_restart_nodejs is not a right part, as paths may be lost/not passed properly *after* restart.<br /><br />HTH.Krzysztof (Chris) Danielhttps://www.blogger.com/profile/02643339658259354232noreply@blogger.comtag:blogger.com,1999:blog-3356090267744964460.post-64907558885079665332015-01-21T21:54:46.354+01:002015-01-21T21:54:46.354+01:00Yes found issue needed to add a pre_restart_nodejs...Yes found issue needed to add a pre_restart_nodejs and pre_restart_nodejs handlers where path is set..<br /><br />echo "setting up path for libraries"<br />export LD_LIBRARY_PATH=$OPENSHIFT_DATA_DIR/usr/local/lib:/opt/rh/nodejs010/root/usr/lib64:$LD_LIBRARY_PATH<br />export PKG_CONFIG_PATH=$OPENSHIFT_DATA_DIR/usr/local/lib/pkgconfig<br /><br /><br />I am getting a different error now in openshift... <br /><br />stream.js:94<br /> throw er; // Unhandled stream error in pipe.<br /> ^<br />Error: the surface type is not appropriate for the operation<br /> at /var/lib/openshift/5473dbe3ecb8d47187000167/app-root/runtime/repo/node_modules/canvas/lib/pngstream.js:42:19<br /> at process._tickDomainCallback (node.js:459:13)<br />Justin Earlyhttps://www.blogger.com/profile/08720326608962419533noreply@blogger.comtag:blogger.com,1999:blog-3356090267744964460.post-83516065444437040322015-01-20T08:22:12.427+01:002015-01-20T08:22:12.427+01:00Can't tell for sure but it looks like the libp...Can't tell for sure but it looks like the libpng is not there. Could you try to locate it? Maybe the build script (first one in my blogpost) ended with an error?Krzysztof (Chris) Danielhttps://www.blogger.com/profile/02643339658259354232noreply@blogger.comtag:blogger.com,1999:blog-3356090267744964460.post-65559090869566713252015-01-20T02:16:45.853+01:002015-01-20T02:16:45.853+01:00Did you ever see this error? I am following your i...Did you ever see this error? I am following your instructions on my gear and getting this error.<br /><br />Error: libpng15.so.15: cannot open shared object file: No such file or directory<br /> at Module.load (module.js:356:32)<br /> at Function.Module._load (module.js:312:12)<br /> at Module.require (module.js:364:17)<br /> at require (module.js:380:17)<br /> at Object. (/var/lib/openshift/5473dbe3ecb8d47187000167/app-root/runtime/repo/node_modules/canvas/lib/bindings.js:2:18)<br /> at Module._compile (module.js:456:26)<br /> at Object.Module._extensions..js (module.js:474:10)<br /> at Module.load (module.js:356:32)<br /> at Function.Module._load (module.js:312:12)<br /> at Module.require (module.js:364:17)Justin Earlyhttps://www.blogger.com/profile/08720326608962419533noreply@blogger.comtag:blogger.com,1999:blog-3356090267744964460.post-51400950768048240672014-11-15T11:50:56.556+01:002014-11-15T11:50:56.556+01:00I *guess* it is because of paths.
Cairo does not c...I *guess* it is because of paths.<br />Cairo does not check whether pixman is installed in the registry, it does look for a certain libraries only in specific folders. Figuring out what those folders are and where to put/link pixman may be non-trivial. Krzysztof (Chris) Danielhttps://www.blogger.com/profile/02643339658259354232noreply@blogger.comtag:blogger.com,1999:blog-3356090267744964460.post-54881753423973259022014-11-15T00:18:10.903+01:002014-11-15T00:18:10.903+01:00Thanks, this was exactly what I needed!Thanks, this was exactly what I needed!k4https://www.blogger.com/profile/15405245699570621911noreply@blogger.comtag:blogger.com,1999:blog-3356090267744964460.post-78267121437805456892014-11-13T03:03:20.883+01:002014-11-13T03:03:20.883+01:00Cool! Any idea why Cairo would thinks image surfa...Cool! Any idea why Cairo would thinks image surface backend feature can't be enabled -- i.e., it can't tell pixman is installed?elephant_earshttps://www.blogger.com/profile/07711970099743621176noreply@blogger.com