Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have trouble deploying the sample #1363

Closed
victor112991 opened this issue Sep 9, 2016 · 12 comments
Closed

have trouble deploying the sample #1363

victor112991 opened this issue Sep 9, 2016 · 12 comments

Comments

@victor112991
Copy link

I use cloud9 to deploy the sample to heroku,

Here is the link I follow to deploy. Everything looks good.
https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-heroku

But after git push heroku master, there is nothing on the page. I go to inspect and get the following message

Error invoking SubsManager.subscribe("Inventory"): Subscription 'Inventory' not found
be55425….js?meteor_js_resource=true:229 BlazeLayout warning: unknown template "coreLayout"

Anyone can tell me where is the problem?

@vigyano
Copy link

vigyano commented Sep 10, 2016

I too get this issue in heroku from version v0.15.0.
v0.14.1 works fine in heroku.

@jshimko
Copy link
Contributor

jshimko commented Sep 13, 2016

This appears to be because the plugin loader stuff doesn't happen unless you use reaction-cli or build the app with Docker. So it looks like we need to create our own Heroku buildpack if we're going to officially support Heroku deployment. We unfortunately have enough specific needs in the build process that we can't really assume builds will work the same way in every Meteor build environment (which is why we generally recommend everyone use Docker - it guarantees consistency no matter where you deploy it).

So if we need to create a fork of the horse buildpack, the change needs to happen right here before the meteor build. You could probably just add a single line there that runs the bash version of the plugin loader. That's exactly what the Docker build does right before building the app.

@swrdfish
Copy link

swrdfish commented Sep 14, 2016

I made some changes to the horse buildpack as suggested by @jshimko and the deploy worked perfectly.

@victor112991 and @vigyano you can use my fork.

heroku buildpacks:set https://github.com/swrdfish/meteor-buildpack-horse.git

@jshimko
Copy link
Contributor

jshimko commented Sep 14, 2016

Thanks @swrdfish!

@joseconstela
Copy link

Can't get it to work. I'm getting the following errors:

cfs:gridfs: updating npm dependencies -- mongodb, gridfs-stream...
Warning: unable to resolve "stage-2" in presets of /tmp/build_66ee8091063c406ed58efb30960cb1a0/.babelrc
Unable to resolve some modules:
  "autoprefixer" in
/tmp/build_66ee8091063c406ed58efb30960cb1a0/server/api/core/ui.js
(os.linux.x86_64)
If you notice problems related to these missing modules, consider running:
  meteor npm install --save autoprefixer

I've tried with @swrdfish and AdmitHub buildpacks

Also tried with RC master & development branches in free & paid dynos 🤔

@jshimko
Copy link
Contributor

jshimko commented Oct 6, 2016

@joseconstela That error is definitely because meteor npm install isn't being run. And I guarantee the original horse buildpack won't work for you. You will definitely need to use the fork @swrdfish posted.

heroku buildpacks:set https://github.com/swrdfish/meteor-buildpack-horse.git

@vigyano
Copy link

vigyano commented Mar 4, 2017

@swrdfish fork does not work anymore with master, development branches. anything changed?

@swrdfish
Copy link

swrdfish commented Mar 6, 2017

@vigyano I haven't changed anything. I deployed the development branch.. and things seem to work fine except the styles were not loaded properly which i guess is a configuration issue. Do you have a similar issue or is there something else. I'll look into the issue further when I get some time.

@jshimko
Copy link
Contributor

jshimko commented Mar 6, 2017

The styles not loading is because reaction-cli now reads all of the stylesheets from the plugins and then creates an imports file for them. The heroku buildpack doesn't have this change, so no stylesheets are being imported from all of the plugins in the imports folder.

Unfortunately, the Heroku buildpack and Heroku in general are not officially supported by the Reaction team. We're happy to answer questions, but we won't be updating or maintaining any buildpacks and we can't offer any support on Heroku deployments.

Of course, that doesn't mean it can't work. It just means it won't be officially supported. If someone wants to maintain a buildpack, I'd be happy to point you in the right direction on what needs to be fixed. The best update you could make would probably be to install reaction-cli in the buildpack, then use that to build the app (instead of the bash script that is currently there).

Otherwise, our recommendation is always to deploy Reaction with Docker since it's our officially supported method. Our Docker build will always have the latest requirements for a production deployment.

@swrdfish
Copy link

swrdfish commented Mar 7, 2017

@jshimko thank you for pointing it out. I'll make the necessary changes to my fork.

@mo2menelzeiny
Copy link

@swrdfish any updates on making changes to your fork, as I'm still getting the error due to the buildpack.

@swrdfish
Copy link

@mo2menelzeiny I have updated the buildpack. Check if it works.

sorry for the delay, I was out trekking 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants