Use prerender-node in production


#1

Hi community,

Anyone use prerender-node in production with mup ? If i test to deploy my APP with prerender-node, it failed on ‘verifying deploiement’ :

 - Verifying Deployment
^[    [xx.xxx.xxx.xxx] x Verifying Deployment: FAILED

-----------------------------------STDERR-----------------------------------
ib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
make: Leaving directory '/bundle/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt/build'
bcrypt@0.8.7 /bundle/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bcrypt
bindings@1.2.1 /bundle/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/bindings
nan@2.3.5 /bundle/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules/nan

> buffertools@2.1.4 install /bundle/bundle/programs/server/npm/node_modules/bufferstream/node_modules/buffertools
> node-gyp rebuild

make: Entering directory '/bundle/bundle/programs/server/npm/node_modules/bufferstream/node_modules/buffertools/build'
CXX(target) Release/obj.target/buffertools/buffertools.o

=> Redeploying previous version of the app

-----------------------------------STDOUT-----------------------------------

To see more logs type 'mup logs --tail=50'

----------------------------------------------------------------------------

My /import/startup/server/prerenderIO.js (based on https://juststartworking.com/meteor-and-seo-the-right-way/) :

import prerenderIO from 'prerender-node';
import { Meteor } from 'meteor/meteor';
import { WebApp } from 'meteor/webapp';



/**
* Description for startup
* @private
* @method startup
* @param {Object} (
* @return {Object} description
*/
Meteor.startup(() => {

  const settings = Meteor.settings.private.PrerenderIO;

  if (settings && settings.token && settings.host) {
    prerenderIO.set('prerenderToken', settings.token);
    prerenderIO.set('host', settings.host);
    prerenderIO.set('protocol', 'http');
    WebApp.rawConnectHandlers.use(prerenderIO);
  }

});

Do you have any idea ?

Thank you !


#2

Anyone have idea ? :slight_smile:


#3

Unless this is a copy paste error, you should change your prerenderio references to be prerenderIO, to match your import statement (which is case sensitive).


#4

Yep indeed, it’s copy paste error, sorry !

I’ve edit my first post :slight_smile: