I Try to use Prerender.io in my web app, and get a lot of TypeError

use this package:
https://github.com/dfischer/meteor-prerenderio

when I visit :
http://localhost:3000/documents/5/edTguJiZMxdXzuRGZ?escaped_fragment=

get these errors…:

2017-04-25T10:43:05.158Z getting http://localhost:3000/documents/5/edTguJiZMxdXzuRGZ
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/es5-shim.js?hash=adc3c6270d5697523fe2a72e73428390b7eba83a:17
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/promise.js?hash=933c3e2dae245cb099cd64e6d0e7ddd1922c169b:17
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/ecmascript-runtime.js?hash=6bc4a609ab9ac813787b22ca95e77feb290b0bbd:17
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/babel-runtime.js?hash=3a88b21160e3446ac48d46a9032246bf605e7afe:17
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/random.js?hash=a3be1ee923a6fc933f063c7f8de3e15243e12f47:18
TypeError: undefined is not an object (evaluating 'Package.random.Random')

  http://localhost:3000/packages/mongo-id.js?hash=345d169d517353f8146292b4abd24061721f8b26:19
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/geojson-utils.js?hash=b204c7d4caf119e6883522fb87c6cce060724bf0:17
TypeError: undefined is not an object (evaluating 'Package['mongo-id'].MongoID')

  http://localhost:3000/packages/minimongo.js?hash=15fb4e0e5e55cdddc5e59a060001fc2b0249cc65:23
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/check.js?hash=87c633843915b879a0c9676ea81f1cd351296e41:17
TypeError: undefined is not an object (evaluating 'Package.random.Random')

  http://localhost:3000/packages/retry.js?hash=1e409617b538ff3e2b0238b15e45b3380c51a224:18
TypeError: undefined is not an object (evaluating 'Package.check.check')

  http://localhost:3000/packages/ddp-common.js?hash=d42359bcace6c66ac90e2782193494253ee68155:17
TypeError: undefined is not an object (evaluating 'Package['ecmascript-runtime'].Symbol')

  http://localhost:3000/packages/reload.js?hash=628b069673bffbc7390ba84ece8809c8c88c2eed:18
TypeError: undefined is not an object (evaluating 'Package.check.check')

  http://localhost:3000/packages/ddp-client.js?hash=6791673413c62991cb6720e07f95de876a504b97:17
TypeError: undefined is not an object (evaluating 'Package['ddp-client'].DDP')

  http://localhost:3000/packages/ddp.js?hash=25dc3f428447c81620c91c4245dbc6e4f7d32fb7:14
TypeError: undefined is not an object (evaluating 'Package.minimongo.LocalCollection')

  http://localhost:3000/packages/allow-deny.js?hash=0a3547d203dfd89d9484cad533c54cd0f4778263:18
TypeError: undefined is not an object (evaluating 'Package['allow-deny'].AllowDeny')

  http://localhost:3000/packages/mongo.js?hash=90f037f47abee1e74ba80360e6b3f3dbaa792260:17
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/reactive-dict.js?hash=fafa4f575f707596da31c349eb0ddb1f899f1e3d:21
TypeError: undefined is not an object (evaluating 'Package['reactive-dict'].ReactiveDict')

  http://localhost:3000/packages/session.js?hash=821b0746e602b3be69538d299d6866e222121b54:18
TypeError: undefined is not an object (evaluating 'Package.random.Random')

  http://localhost:3000/packages/localstorage.js?hash=0e2106503b232ac80073b6e8ef206e988c5aca5b:17
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/jquery.js?hash=c57b3cfa0ca9c66400d4456b6f6f1e486ee10aad:17
TypeError: undefined is not an object (evaluating 'Package['mongo-id'].MongoID')

  http://localhost:3000/packages/observe-sequence.js?hash=8fe58036c6ba00c458f54c360a21fd0e41fb7ee0:19
TypeError: undefined is not an object (evaluating 'Package.jquery.$')

  http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:17
TypeError: undefined is not an object (evaluating 'Package.random.Random')

  http://localhost:3000/packages/accounts-base.js?hash=b329702c620fc43a88c7a7fc40fdbcf0e5d7c1b9:20
TypeError: undefined is not an object (evaluating 'Package.random.Random')

  http://localhost:3000/packages/srp.js?hash=85fa5b3bc1440273f8fa5125df5443c09f337567:17
TypeError: undefined is not an object (evaluating 'Package['accounts-base'].Accounts')

  http://localhost:3000/packages/accounts-password.js?hash=43132122c568d428133aeec601bf39b36fee4a63:17
TypeError: undefined is not an object (evaluating 'Package.check.check')

  http://localhost:3000/packages/aldeed_simple-schema.js?hash=13e803ef04b6685a7577083e5871767a498b6351:20
TypeError: undefined is not an object (evaluating 'Package['aldeed:simple-schema'].SimpleSchema')

  http://localhost:3000/packages/aldeed_collection2-core.js?hash=cd76f0a8f289f873c33e0896e9a86201e64a47d1:17
TypeError: undefined is not an object (evaluating 'Package['aldeed:collection2-core'].Collection2')

  http://localhost:3000/packages/aldeed_schema-index.js?hash=5f0c7f93d339b4899a5f1aa271976345de4a8b33:17
TypeError: undefined is not an object (evaluating 'Package['aldeed:collection2-core'].Collection2')

  http://localhost:3000/packages/aldeed_schema-deny.js?hash=c46f0998a459ed45c0c557fcb85c31b85c40e7d4:17
TypeError: undefined is not an object (evaluating 'Package['accounts-base'].Accounts')

  http://localhost:3000/packages/alanning_roles.js?hash=74a6254e5f51f2a2b4da007c0627229e19bcfef5:18
TypeError: undefined is not an object (evaluating 'Package['observe-sequence'].ObserveSequence')

  http://localhost:3000/packages/spacebars.js?hash=ebf9381e7fc625d41acb0df14995b7614360858a:17
TypeError: undefined is not an object (evaluating 'Package.blaze.Blaze')

  http://localhost:3000/packages/templating-runtime.js?hash=c18de19afda6e9f0db7faf3d4382a4c953cabe18:18
TypeError: undefined is not an object (evaluating 'Package['templating-runtime'].Template')

  http://localhost:3000/packages/templating.js?hash=c2cf38de06efb47f67affb2dff9320e5eef33893:14
TypeError: undefined is not an object (evaluating 'Package['templating-runtime'].Template')

  http://localhost:3000/packages/themeteorchef_bert.js?hash=3988a8385b057808009b23158af9974767ae84fa:17
TypeError: undefined is not an object (evaluating 'Package.mongo.Mongo')

  http://localhost:3000/packages/xolvio_cleaner.js?hash=d1305f127547b3ceede6f7d65308b4be520fa223:17
TypeError: undefined is not an object (evaluating 'Package.check.check')

  http://localhost:3000/packages/mdg_validated-method.js?hash=6427bdae9f989ecfeec537ad65ca5997622e9efb:17
TypeError: undefined is not an object (evaluating 'Package.minimongo.LocalCollection')

  http://localhost:3000/packages/dburles_factory.js?hash=fbec5c5ae30d515dda30b8ed3403a77a810ddbba:17
TypeError: undefined is not an object (evaluating 'Package.mongo.Mongo')

  http://localhost:3000/packages/dburles_collection-helpers.js?hash=3ef2eff277fdbdf9dc43ba883d1e1c774bfa77f9:18
TypeError: undefined is not an object (evaluating 'Package['templating-runtime'].Template')

  http://localhost:3000/packages/meteortoys_toykit.js?hash=92ed3a86a4f0abfca714f9154443f2cdadb6b9bc:17
TypeError: undefined is not an object (evaluating 'Package['templating-runtime'].Template')

  http://localhost:3000/packages/msavin_mongol.js?hash=7ecc5fcdaf2b92df66428ebcf4dd3227e3f334f0:17
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/http.js?hash=9355a65a433bea87be60bc1fd90e0ef608af93e4:19
TypeError: undefined is not an object (evaluating 'Package.mongo.Mongo')

  http://localhost:3000/packages/meteorhacks_search-source.js?hash=742e0cc86ae0722251bf1fce2b693449a2f66ef9:20
TypeError: undefined is not an object (evaluating 'Package.check.check')

  http://localhost:3000/packages/oauth.js?hash=a519c3410a532671028fac814c0ad30bbcd1a539:17
TypeError: undefined is not an object (evaluating 'Package.random.Random')

  http://localhost:3000/packages/accounts-oauth.js?hash=71bd7085755ff0efd6810752c2fde7110adf0538:18
TypeError: undefined is not an object (evaluating 'Package['accounts-base'].Accounts')

  http://localhost:3000/packages/service-configuration.js?hash=42ac9ae8eb44f3e73762f9cb0003410397021984:17
TypeError: undefined is not an object (evaluating 'Package.oauth.OAuth')

  http://localhost:3000/packages/github-oauth.js?hash=510b17c5a67843b685e6af3f1356f746ce42131c:17
TypeError: undefined is not an object (evaluating 'Package['templating-runtime'].Template')

  http://localhost:3000/packages/github-config-ui.js?hash=b5a7e0b7880578c7273ed14a41380f8d41204502:17
TypeError: undefined is not an object (evaluating 'Package['accounts-base'].Accounts')

  http://localhost:3000/packages/accounts-github.js?hash=dd7e414dd307c0864d1d0367ec86ce4b0558a589:17
TypeError: undefined is not an object (evaluating 'Package.random.Random')

  http://localhost:3000/packages/meteorhacks_kadira.js?hash=f06528cab41bbb4e984c2c86834f42bb1ff30942:18
TypeError: undefined is not an object (evaluating 'Package.random.Random')

  http://localhost:3000/packages/kadira_debug.js?hash=82ada704e9a1775a99bbc5c2d0d69a3df84f73d2:18
TypeError: undefined is not an object (evaluating 'Package.http.HTTP')

  http://localhost:3000/packages/ostrio_cookies.js?hash=48f55d64bb07fc023af32946392cf104cb212ade:18
TypeError: undefined is not an object (evaluating 'Package.http.HTTP')

  http://localhost:3000/packages/ostrio_files.js?hash=f8ca2bd5fea2841218279daab396e32fac76c2c9:20
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/kadira_dochead.js?hash=cd9b8111be8940830fc9fc1f5e0b1429c7ff2cde:19
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/okgrow_analytics.js?hash=1b96dac977610cf86aefd587621168a38d06db26:17
TypeError: undefined is not an object (evaluating 'Package.modules.meteorInstall')

  http://localhost:3000/packages/webapp.js?hash=8024f6bce97bd768bcff7fc9d76449e74f051e36:18
TypeError: undefined is not an object (evaluating 'Package['ddp-client'].DDP')

  http://localhost:3000/packages/livedata.js?hash=7cf1831a60b48e304b054aee1ae0f7e38ff35d09:14
TypeError: undefined is not an object (evaluating 'Package.retry.Retry')

  http://localhost:3000/packages/autoupdate.js?hash=1fd9cf3472adaa6887170d88ab5ea1ddabf695fa:19
TypeError: undefined is not an object (evaluating 'Package.mongo.Mongo')

  http://localhost:3000/packages/global-imports.js?hash=826b6c7f5e28c4582e17a3f470dfb5d7e5f4ce65:3 in global code
ReferenceError: Can't find variable: meteorInstall

  http://localhost:3000/app/app.js?hash=95628e784e15dcde54fc1e4c1b1b4e670a48fb6c:1 in global code
TypeError: undefined is not an object (evaluating 'Package.check.check')

  http://localhost:3000/packages/mdg_validation-error.js?hash=c824fee078386259563451e9fa961549731965f5:17
2017-04-25T10:43:08.788Z got 200 in 3630ms for http://localhost:3000/documents/5/edTguJiZMxdXzuRGZ

:sweat:

Hi there! Do you have that website hosted publicly anywhere that we could access and test? If so, feel free to email it to me at todd@prerender.io. I’d love to help figure out what’s going on here.

1 Like

PreRender.io is awesome, there’s not a decent guide out there for installation, but once you get it working, it’s really cool and easier to setup than I thought lol.

Thanks for the feedback :slight_smile: We’ll have to improve our documentation!

I’m not so certain it’s the documentation; Meteor itself is a very difficult system to learn.

For example, my settings.json has to be on ONE LINE to get it working. No where on the net does it say to do this. Even when you bundle and deploy, it’ll go haywire. So, that means the prerender.io service simply won’t work.

The whole issue of ?fragment_cache or whatever is soooo confusing to learn. I mean, it makes sense 3 weeks after studying the material and trial and error, like pretty obvious now - but it’s still whacky.

Anyway, just wanted to put some solid defense in for prerender, I bet theres a lot of folks who get stuck and abandon ship. You shouldn’t. Prerender is fantastic once it works.

Thanks a lot, I have got email from you!

[Error] SyntaxError: Unexpected keyword ‘const’
(anonymous function) (431789012886b43af9745cefbf7fed5eeac6b4ac.js, line 95)

Are you using ES6 javascript in your code? If so, our rendering engine (PhantomJS v2.1.1) doesn’t currently support ES6. Can you use Babel to transpile that to ES5?

But in meteor there has default packages transpile app to ES5

ecmascript 0.7.2* Compiler plugin that supports ES2015+ in all .js files
es5-shim 4.6.15 Shims and polyfills to improve ECMAScript 5 support

So, I go back here…

I have tried prerenderio with meteor official todo web app.
prerender is ok…

Looks like something wrong with my code…
It run well in production, and error info is hard to trace…
What could I do next…:cry:

Make sure your PreRender dashboard is connecting to your site. You’ll see pages generating, and PR will tell you there has been a connection

Hi, Thanks for your help…
I have found something wrong with my codes…
When I use ali-oss package in meteor-file like this

import oss 		from 'ali-oss';

I will get those error info…
Delete this import, PR is ok…

Meteor has babel default right?
This package use es6 character, like Generator Function
What could I do next?
I don’t know how to config babel in meteor just for this package…
Want any suggestions…
Thanks!
:cry:

I have found the error… I should require package in Meteor.server…