使用node-prerender进行Meteor部署失败

时间:2016-09-12 06:54:09

标签: meteor seo prerender

我想用node-prerender部署我的Meteor APP,但在使用mup进行'验证部署'时失败。

我没有任何错误,只是失败了:

- 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'

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

如果我测试部署我的APP没有node-prerender,那就很好用了。

我基于this blog post

我在服务器上的JS调用:

Meteor.startup(() => {

  const prerenderio = Npm.require('prerender-node');
  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);
  }

});

我在本地没有错误。

你有什么想法吗?

谢谢!

0 个答案:

没有答案