I have a fresh install of Phoenix 1.3 and working on a new project. I’ve followed the instructions on the Phoenix site for deploying to Heroku http://www.phoenixframework.org/docs/heroku . However, I’m getting an error when trying to push. I’m suspecting the path of ../deps/phoenix and have tried a couple of different options such as deps/phoenix but nothing is solving the issue.
Console
Simons-MBP:dmt Simon$ git push heroku master
Counting objects: 155, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (136/136), done.
Writing objects: 100% (155/155), 58.46 KiB | 0 bytes/s, done.
Total 155 (delta 43), reused 0 (delta 0)
remote: Compressing source files… done.
remote: Building source:
remote:
remote: -----> Phoenix app detected
remote:
remote: -----> Loading configuration and environment
remote: Loading config…
remote: WARNING: phoenix_static_buildpack.config wasn’t found in the app
remote: Using default config from Phoenix static buildpack
remote: Detecting assets directory
remote: WARNING: no package.json detected in root nor custom directory
remote: * assuming phoenix 1.3.x and later, please check config file
remote: Will use phoenix configuration:
remote: * assets path assets
remote: * mix tasks namespace phx
remote: Will use the following versions:
remote: * Node 6.9.2
remote: Will export the following config vars:
remote: DATABASE_URL
remote: POOL_SIZE
remote: SECRET_KEY_BASE
remote: * MIX_ENV=prod
remote:
remote: -----> Installing binaries
remote: Downloading node 6.9.2…
remote: Installing Node 6.9.2…
remote: Using default npm version
remote:
remote: -----> Building dependencies
remote: Installing and caching node modules
remote: npm WARN package.json @ No description
remote: npm WARN package.json @ No README data
remote: npm ERR! addLocal Could not install /tmp/deps/phoenix
remote: npm ERR! addLocal Could not install /tmp/deps/phoenix_html
remote: npm ERR! Linux 3.13.0-112-generic
remote: npm ERR! argv “/tmp/build_39c31bc1b95fb93fa0e609c296a4e0f0/.heroku/node/bin/node” “/tmp/build_39c31bc1b95fb93fa0e609c296a4e0f0/.heroku/node/bin/npm” “install” “–quiet” “–unsafe-perm” “–userconfig” “/tmp/build_39c31bc1b95fb93fa0e609c296a4e0f0/npmrc”
remote: npm ERR! node v6.9.2
remote: npm ERR! npm v3.10.9
remote: npm ERR! path /tmp/deps/phoenix
remote: npm ERR! code ENOENT
remote: npm ERR! errno -2
remote: npm ERR! syscall open
remote:
remote: npm ERR! enoent ENOENT: no such file or directory, open ‘/tmp/deps/phoenix’
remote: npm ERR! enoent ENOENT: no such file or directory, open ‘/tmp/deps/phoenix’
remote: npm ERR! enoent This is most likely not a problem with npm itself
remote: npm ERR! enoent and is related to npm not being able to find a file.
remote: npm ERR! enoent
remote:
remote: npm ERR! Please include the following file with any support request:
remote: npm ERR! /tmp/build_39c31bc1b95fb93fa0e609c296a4e0f0/assets/npm-debug.log
remote: ! Push rejected, failed to compile Phoenix app.
remote:
remote: ! Push failed
remote: Verifying deploy…
remote:
remote: ! Push rejected to digitalmoney.
I’m missing mix deps.get in the log, it has to be done strictly before npm/brunch that they can find modules which are bonly in the phoenix package but not in npms registry.
you may have a typo phoenix_static_buildback.config vs phoenix_static_buildpack.config. Anyway, I believe newer versions of that build pack handle Phoenix v1.3 structure without more configurations. Check out hexpm/assets at main · hexpm/hexpm · GitHub for an example Phoenix v1.3 project that is deployed to Heroku; perhaps by comparing that project to your’s you’ll find what’s missing or misconfigured.