-
Notifications
You must be signed in to change notification settings - Fork 131
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
fixing Heroku deployment #45
base: master
Are you sure you want to change the base?
Conversation
Changes Unknown when pulling c36e362 on sizov:master into * on pheuter:master*. |
@coveralls looks fine here, I've tried to git clone original repo from scratch, then add my remote as upstream and was able to fetch and merge changes from my repo into this. |
@@ -1,4 +1,4 @@ | |||
import express from 'express'; | |||
var express = require('express'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be necessary since the top-level start.js
file registers the Babel hook before require
ing server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pheuter thank you for reply, I understand the idea, but unfortunately without this change I was not able to run this on Heroku (and looks like I'm not the only one).
Please see your original app deployed with Heroku button here: https://original-essential-react.herokuapp.com/ (gives error)
And here is the same deployment to Heroku with button from my fork (1 line changed): https://fix-import-essential-react.herokuapp.com/ (works as expected)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I feel hesitant merging this change in just because Heroku isn't properly configured to run the start.js
script before running server.jsx
, I think figuring that out would be a better change since it wouldn't require modifying application code.
@sizov Thank you! This was extremely helpful to get things working on Heroku. |
This fixes issues when deploying to Heroku, #41
import
for ES6 modules is not supported yet natively, butserver.js
hasimport
statement. This project does not buildserver.js
with any build tool to augumentimport
, so nodejs fails on thatimport
line, had to fix itapp.json
are ignored, so you need to set them manually