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

Specifying node_version causes build to fail #46

Closed
ntilwalli opened this issue Nov 10, 2016 · 7 comments
Closed

Specifying node_version causes build to fail #46

ntilwalli opened this issue Nov 10, 2016 · 7 comments

Comments

@ntilwalli
Copy link

Hi. Thanks for providing this tool! When I tried specifying a node_version=6.9.1 in my phoenix_static_buildpack.config I consistently go errors like:

-----> Creating .profile.d with env vars
-----> Writing export for multi-buildpack support
-----> Phoenix app detected
-----> Loading configuration and environment
       Loading config...
       Will use the following versions:
       * Node 6.9.1
       Will export the following config vars:
       * Config vars DATABASE_URL
       * MIX_ENV=prod
-----> Installing binaries
       Downloading node 6.9.1
 !     Push rejected, failed to compile Phoenix app.
 !     Push failed

When I did not specify a node_version the build proceeded properly.

@gjaldon
Copy link
Owner

gjaldon commented Nov 10, 2016

@ntilwalli I'll have to try this out later in my day to see if I can reproduce the error.

@aaronjensen
Copy link
Collaborator

@ntilwalli Try it again, I was able to successfully use 6.9.1

@ntilwalli
Copy link
Author

ntilwalli commented Nov 11, 2016

@aaronjensen I tried again. Same error. This is what my config looks like:

node_version=6.9.1
npm_version=3.10.9
phoenix_relative_path=apps/candle

If I drop the node_version line it works fine

@aaronjensen
Copy link
Collaborator

You might try dropping the npm_version, I don't have that.

This is mine (I'm sure much of this is not relevant to your app):

clean_cache=false
compile="script/buildpack-compile-assets"
config_vars_to_export=(DATABASE_URL TRACKJS_APPLICATION TRACKJS_TOKEN)
node_version=6.9.1
phoenix_relative_path=.
remove_node=true

@ntilwalli
Copy link
Author

@aaronjensen @gjaldon The key was adding the remove_node=true. After I did that it downloaded 6.9.1 properly and completed fine. That param does not seem to be documented in the README, it should be. What does it do? Does it remove the cached version of node? Anyway, thanks for the help. Much appreciated

@aaronjensen
Copy link
Collaborator

@ntilwalli remove_node isn't added yet. It's in this pull request: #36 which is not yet merged.

If adding it fixed the problem for you, it's probable that you just needed a change to the file or your problem was intermittent. I would guess you could remove it and be just fine.

If I'm mistaken, that's inexplicable, but sometimes computers are 😄

@ntilwalli
Copy link
Author

@aaronjensen so odd. I removed the line and tried it again and it just worked. I can't explain it. Maybe there was some LF/CR issue I wasn't seeing. I hate bugs that fix themselves, cuz they can unfix themselves 😉 Hoping that doesn't happen here. Anyway, thanks.

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

3 participants