Meteor: Can't import BrowserPolicy

Created on 4 May 2017  路  3Comments  路  Source: meteor/meteor

Running [email protected] on Ubuntu 16.04.2 LTS with a fresh installation.

Isolated @ https://github.com/AnthonyAstige/meteor-test-browers-policy/commit/1d73b5ee1629d39aeb734c3bb1525d87dd633729

Screenshots

Related

Other things I've tried

  • Clearing build cache (destroying from in the project .meteor/local/build & .meteor/local/bundler-cache/*)
  • Reinstalling meteor (destroying from my home folder ~/.meteor)

Background

I need this to adjust the policy for loading the Stripe api on a galaxy hosted application.

Most helpful comment

Well that was quick, deployment worked and script is now loading from Stripe :)

All 3 comments

Thanks for reporting this issue, and especially for providing a reproduction. It looks like you're trying to import { BrowserPolicy } from "meteor/browser-policy" on the client, but it's only available on the server. If you put your code in server/main.js instead, everything should work.

@benjamn - Ah thank you! Relatively simple oversight, of course it needs to run on the server, it's an HTTP header that needs to be sent. I've got it working locally and presume I'll be able to make it work on Galaxy deployment. I'll close this issue once I confirm fully and deploy (today or tomorrow).

Well that was quick, deployment worked and script is now loading from Stripe :)

Was this page helpful?
0 / 5 - 0 ratings