AdmitHub / meteor-buildpack-horse

Heroku buildpack for Meteor v1.0+. The horse one.
MIT License
641 stars 587 forks source link

Push rejected, failed to compile Node.js app #42

Closed jmwenda closed 8 years ago

jmwenda commented 9 years ago

I keep getting this error. I already have committed to my local repo and the log is as follows. Seems the temporary file created states "mv can not stat", resulting in the error.

https://gist.github.com/jmwenda/2a9f6d9686a2a1080d40

What could be the problem?

tr90814 commented 9 years ago

I had what looks like the same issue, I set my ROOT_URL, pushed again and that seemed to fix it.

AndrewMagliozzi commented 9 years ago

Thanks for the issue, Jude. Did Tom's suggesting fix it?

On Tue, Aug 11, 2015 at 8:14 PM, Tom Rogers notifications@github.com wrote:

I had what looks like the same issue, I set my ROOT_URL, pushed again and that seemed to fix it.

— Reply to this email directly or view it on GitHub https://github.com/AdmitHub/meteor-buildpack-horse/issues/42#issuecomment-130117608 .

simonv3 commented 9 years ago

I got this same issue, you can see the project here: http://github.com/simonv3/quick-survey/, and the app.json file here: https://github.com/simonv3/quick-survey/blob/develop/app.json

I feel like ROOT_URL should maybe default to the app-name?

simonv3 commented 9 years ago

I got it working in the end - had to include the .meteor folder (kind of logical in hindsight) as well as giving a full URL in ROOT_URL. However, the URL I supplied got overwritten and just the name of the app was used, so I'm not sure if that made a difference in the end.

simonv3 commented 9 years ago

Scratch all of that. I'm getting this error again, specifically:

mv: cannot stat ‘/tmp/buildpack_f7be3f1647892740a1495a86332e69e4/build-Fk7n/bundle’: No such file or directory
yourcelf commented 9 years ago

Can you share the repository you're trying to build? That would help a lot with trying to debug.

Also, you can fork this buildpack and uncomment the "verbose" flag, set -x to enable verbose printing of everything the buildpack is doing.

simonv3 commented 9 years ago

It's still the same one from before http://github.com/simonv3/quick-survey/

I'm doing some debugging here: https://github.com/simonv3/meteor-buildpack-horse/

Looks like what's happening is that the meteor build --directory command isn't creating the bundle directory (works fine locally) and is still creating the tar.gz. I've added a tar command (which is not pretty, but can probably suppressed, have to look at the options) and changed rmdir to rm -rf. Building now and see how far it gets.

simonv3 commented 9 years ago

Update: Looks like the changes I made make it all the way through deployment. I wasn't adding a ROOT_URL because of testing, and that actually only fails when the application launches.

2015-09-02T17:01:45.036040+00:00 app[web.1]:     at Object.Meteor.absoluteUrl (packages/meteor/url_common.js:21:1)
2015-09-02T17:01:45.036032+00:00 app[web.1]: Error: Must pass options.rootUrl or set ROOT_URL in the server environment
2015-09-02T17:01:45.036042+00:00 app[web.1]:     at bcrypt (packages/accounts-password/email_templates.js:7:1)
2015-09-02T17:01:45.036045+00:00 app[web.1]:     at /app/.meteor/heroku_build/app/programs/server/packages/accounts-password.js:85:4
2015-09-02T17:01:45.036047+00:00 app[web.1]:     at /app/.meteor/heroku_build/app/programs/server/packages/accounts-password.js:895:3
2015-09-02T17:01:45.036049+00:00 app[web.1]:     at /app/.meteor/heroku_build/app/programs/server/boot.js:222:10
2015-09-02T17:01:45.036051+00:00 app[web.1]:     at Array.forEach (native)
2015-09-02T17:01:45.036054+00:00 app[web.1]:     at Function._.each._.forEach (/app/.meteor/heroku_build/app/programs/server/node_modules/underscore/underscore.js:79:11)
2015-09-02T17:01:45.036056+00:00 app[web.1]:     at /app/.meteor/heroku_build/app/programs/server/boot.js:117:5
2015-09-02T17:01:44.968470+00:00 app[web.1]: /app/.meteor/heroku_build/app/programs/server/node_modules/fibers/future.js:245

So that feels like it would be a false lead on that anyway. I'm wondering if it's possible to remove that requirement entirely and just set it to the app-name + herokuapp.com?

yourcelf commented 9 years ago

Not everyone uses app-name + herokuapp.com as their public facing URL. We could try to check if ROOT_URL is empty first, and set it if only if it's empty..

simonv3 commented 9 years ago

That's what I meant, sorry. I'm currently trying to figure out how to get a hold of the app name in the env variables.

simonv3 commented 9 years ago

And another update: so when I supply the root_url this time around, the untarring didn't work anymore. So meteor build --server $ROOT_URL --directory $BUNDLE_DEST creates the bundle/ directory properly but if no ROOT_URL is passed it just creates the .tar? This is strange because I definitely had added a ROOT_URL when I started :/.

maartenbusstra commented 9 years ago

I'm having this issue with Meteor 1.2-rc.11

yourcelf commented 9 years ago

@maartenbusstra: do you have ROOT_URL set?

maartenbusstra commented 9 years ago

@yourcelf Definitely! Here's the log: https://gist.github.com/maartenbusstra/31c6206604a14b1c3a55

yourcelf commented 9 years ago

@maartenbusstra that log indicates that heroku is using Meteor 1.1.0.3, not Meteor 1.2.

This buildpack currently installs with the latest stable Meteor. But if you have 1.2-specific code and try to bundle it with 1.1.0.3, it'll almost certainly fail. So in short: yours is a different issue -- you'll need to fork this buildpack and change the installation of Meteor to install the release candidate rather than stable.

maartenbusstra commented 9 years ago

@yourcelf Thanks for the help. I got it to work with a different project that's running on 1.2. That's kind of weird.

Do you happen to know where I can "curl" the RC?

yourcelf commented 9 years ago

Nope, don't know where. You could add a line to meteor update --release METEOR@1.2-rc.11 after the curl'ed installation finishes.

maartenbusstra commented 9 years ago

The output from Heroku was kind of odd, but it's working. For anyone that's having the same issue, it's here: https://github.com/mdrnize/meteor-buildpack-horse

Use at your own risk, though!

followyoureyes commented 8 years ago

I came here, because I also had this error. The solution was quite simple: Watch your .gitignore file ;). We had for some reasons the .meteor-folder in the gitignore file...

yourcelf commented 8 years ago

The buildpack now reads from .meteor/release and upgrades meteor to the appropriate version if needed.

jortegamo commented 8 years ago

Hi, I have a problem with .meteor/release. I think I should try to upgrade meteor for my app. My current version is 1.2.0.2. while deploying console shows this error: cat: /tmp/build_f4132d93575831d3633ff3116884aebf/.meteor/release: No such file or directory

Some idea? Thanks

JeanLebrument commented 8 years ago

Edit: Not that similar with the above post. I get this error:

remote: + mv /tmp/buildpack20160407-161-1peoq2o/build-k71Z/bundle /tmp/build_21929a3e8268914b64f423993e860740/.meteor/heroku_build/app
remote: mv: cannot stat ‘/tmp/buildpack20160407-161-1peoq2o/build-k71Z/bundle’: No such file or directory

Meteor: METEOR@1.2.1

yourcelf commented 8 years ago

@JeanLebrument or @jortegamo: do you have your meteor app in a subdirectory of your repository? This buildpack currently expects to find .meteor/ either in the root of the repository or in app/.meteor/. See https://github.com/AdmitHub/meteor-buildpack-horse/issues/81 for more troubleshooting on that.

JeanLebrument commented 8 years ago

@yourcelf I just edited my post, mine isn't that similar

yourcelf commented 8 years ago

@JeanLebrument please open your issue as a new issue. Please also include more of the output log -- I'd like to be able to see what happened before that line.