Closed gfrivolt closed 7 years ago
I tried to deploy to Heroku. It failed with that error. Looks like heroku is missing package.json. Maybe either adding an empty package.json or somehow telling (in elixir_buildpack.config?) heroku not to look for it would help.
package.json
elixir_buildpack.config
-----> Elixir app detected -----> Checking Erlang and Elixir versions WARNING: elixir_buildpack.config wasn't found in the app Using default config from Elixir buildpack Will use the following versions: * Stack cedar-14 * Erlang 18.3 * Elixir 1.2.6 Will export the following config vars: * Config vars DATABASE_URL * MIX_ENV=prod -----> Stack changed, will rebuild -----> Fetching Erlang 18.3 -----> Installing Erlang 18.3 (changed) -----> Fetching Elixir v1.2.6 -----> Installing Elixir v1.2.6 (changed) -----> Installing Hex * creating /app/.mix/archives/hex-0.14.0.ez -----> Installing rebar * creating /app/.mix/rebar * creating /app/.mix/rebar3 -----> Fetching app dependencies with mix Running dependency resolution * Getting phoenix (Hex package) Checking package (https://repo.hex.pm/tarballs/phoenix-1.1.4.tar) Fetched package * Getting gettext (Hex package) Checking package (https://repo.hex.pm/tarballs/gettext-0.11.0.tar) Fetched package * Getting cowboy (Hex package) Checking package (https://repo.hex.pm/tarballs/cowboy-1.0.4.tar) Fetched package * Getting ex_microsoftbot (Hex package) Checking package (https://repo.hex.pm/tarballs/ex_microsoftbot-0.1.0.tar) Fetched package * Getting phoenix_microsoftbot (Hex package) Checking package (https://repo.hex.pm/tarballs/phoenix_microsoftbot-0.1.0.tar) Fetched package * Getting httpotion (Hex package) Checking package (https://repo.hex.pm/tarballs/httpotion-2.2.2.tar) Fetched package * Getting poison (Hex package) Checking package (https://repo.hex.pm/tarballs/poison-2.1.0.tar) Fetched package * Getting ibrowse (Hex package) Checking package (https://repo.hex.pm/tarballs/ibrowse-4.2.2.tar) Fetched package * Getting cowlib (Hex package) Checking package (https://repo.hex.pm/tarballs/cowlib-1.0.2.tar) Fetched package * Getting ranch (Hex package) Checking package (https://repo.hex.pm/tarballs/ranch-1.2.1.tar) Fetched package * Getting plug (Hex package) Checking package (https://repo.hex.pm/tarballs/plug-1.1.4.tar) Fetched package cp: cannot stat ‘/app/.hex/registry.ets’: No such file or directory -----> Copying hex from /app/.mix/archives/hex-0.14.0.ez -----> Compiling ==> gettext Compiled src/gettext_po_parser.yrl Compiled src/gettext_po_parser.erl Compiled lib/gettext/backend.ex Compiled lib/gettext.ex Compiled lib/gettext/extractor_agent.ex Compiled lib/gettext/interpolation.ex Compiled lib/gettext/po/exceptions.ex Compiled lib/gettext/po/plural_translation.ex Compiled lib/gettext/plural.ex Compiled lib/gettext/po/translation.ex Compiled lib/gettext/po/tokenizer.ex Compiled lib/gettext/extractor.ex Compiled lib/gettext/po/parser.ex Compiled lib/gettext/compiler.ex Compiled lib/gettext/merger.ex Compiled lib/gettext/po.ex Compiled lib/gettext/fuzzy.ex Compiled lib/mix/tasks/compile.gettext.ex Compiled lib/gettext/po/translations.ex Compiled lib/mix/tasks/gettext.extract.ex Compiled lib/mix/tasks/gettext.merge.ex Generated gettext app ==> ranch (compile) Compiled src/ranch_transport.erl Compiled src/ranch_app.erl Compiled src/ranch.erl Compiled src/ranch_protocol.erl Compiled src/ranch_listener_sup.erl Compiled src/ranch_acceptor.erl Compiled src/ranch_conns_sup.erl Compiled src/ranch_sup.erl Compiled src/ranch_server.erl Compiled src/ranch_tcp.erl Compiled src/ranch_ssl.erl Compiled src/ranch_acceptors_sup.erl ==> poison Compiled lib/poison.ex Compiled lib/poison/decoder.ex Compiled lib/poison/parser.ex Compiled lib/poison/encoder.ex Generated poison app ==> cowlib (compile) Compiled src/cow_http.erl Compiled src/cow_cookie.erl Compiled src/cow_date.erl Compiled src/cow_qs.erl Compiled src/cow_multipart.erl Compiled src/cow_http_te.erl Compiled src/cow_http_hd.erl Compiled src/cow_spdy.erl Compiled src/cow_mimetypes.erl ==> cowboy (compile) Compiled src/cowboy_middleware.erl Compiled src/cowboy_sub_protocol.erl Compiled src/cowboy_app.erl Compiled src/cowboy_bstr.erl Compiled src/cowboy_clock.erl Compiled src/cowboy_static.erl Compiled src/cowboy_handler.erl Compiled src/cowboy_websocket.erl Compiled src/cowboy_protocol.erl Compiled src/cowboy_http_handler.erl Compiled src/cowboy_sup.erl Compiled src/cowboy_websocket_handler.erl Compiled src/cowboy_rest.erl Compiled src/cowboy_loop_handler.erl Compiled src/cowboy_http.erl Compiled src/cowboy.erl Compiled src/cowboy_router.erl Compiled src/cowboy_req.erl Compiled src/cowboy_spdy.erl ==> ibrowse (compile) Compiled src/ibrowse_lib.erl Compiled src/ibrowse_socks5.erl Compiled src/ibrowse_sup.erl Compiled src/ibrowse_lb.erl Compiled src/ibrowse_app.erl Compiled src/ibrowse.erl Compiled src/ibrowse_http_client.erl lib/httpotion.ex:292: warning: implementation of the Access protocol is deprecated. For customization of the data[key] syntax, please implement the Access behaviour in your struct ==> httpotion Compiled lib/httpotion.ex Generated httpotion app ==> ex_microsoftbot Compiled lib/models/action.ex Compiled lib/models/auth_data.ex Compiled lib/models/attachment.ex Compiled lib/ex_microsoftbot.ex Compiled lib/models/bot_data.ex Compiled lib/models/channel_account.ex Compiled lib/models/location.ex Compiled lib/models/mention.ex Compiled lib/models/message.ex Generated ex_microsoftbot app ==> plug Compiled lib/plug.ex Compiled lib/plug/adapters/cowboy.ex Compiled lib/plug/builder.ex Compiled lib/plug/conn/adapter.ex Compiled lib/plug/conn/cookies.ex Compiled lib/plug/conn/status.ex Compiled lib/plug/conn/query.ex Compiled lib/plug/conn/unfetched.ex Compiled lib/plug/conn/utils.ex Compiled lib/plug/conn/wrapper_error.ex Compiled lib/plug/crypto.ex Compiled lib/plug/crypto/key_generator.ex Compiled lib/plug/crypto/message_encryptor.ex Compiled lib/plug/adapters/test/conn.ex Compiled lib/plug/adapters/translator.ex Compiled lib/plug/adapters/cowboy/handler.ex Compiled lib/plug/crypto/message_verifier.ex Compiled lib/plug/error_handler.ex Compiled lib/plug/exceptions.ex Compiled lib/plug/head.ex Compiled lib/plug/html.ex Compiled lib/plug/logger.ex Compiled lib/plug/conn.ex Compiled lib/plug/csrf_protection.ex Compiled lib/plug/method_override.ex Compiled lib/plug/debugger.ex Compiled lib/plug/parsers.ex Compiled lib/plug/parsers/json.ex Compiled lib/plug/parsers/urlencoded.ex Compiled lib/plug/request_id.ex Compiled lib/plug/router.ex Compiled lib/plug/router/utils.ex Compiled lib/plug/session.ex Compiled lib/plug/session/store.ex Compiled lib/plug/session/ets.ex Compiled lib/plug/session/cookie.ex Compiled lib/plug/ssl.ex Compiled lib/plug/static.ex Compiled lib/plug/supervisor.ex Compiled lib/plug/test.ex Compiled lib/plug/upload.ex Compiled lib/plug/parsers/multipart.ex Compiled lib/plug/adapters/cowboy/conn.ex Compiled lib/plug/mime.ex Generated plug app ==> phoenix Compiled lib/mix/tasks/compile.phoenix.ex Compiled lib/mix/tasks/phoenix.digest.ex Compiled lib/mix/tasks/phoenix.gen.channel.ex Compiled lib/mix/phoenix.ex Compiled lib/mix/tasks/phoenix.gen.json.ex Compiled lib/mix/tasks/phoenix.gen.html.ex Compiled lib/mix/tasks/phoenix.gen.secret.ex Compiled lib/mix/tasks/phoenix.gen.model.ex Compiled lib/mix/tasks/phoenix.routes.ex Compiled lib/mix/tasks/phoenix.server.ex Compiled lib/phoenix.ex Compiled lib/phoenix/code_reloader/proxy.ex Compiled lib/phoenix/code_reloader.ex Compiled lib/phoenix/code_reloader/server.ex Compiled lib/phoenix/config.ex Compiled lib/phoenix/controller/pipeline.ex Compiled lib/phoenix/digester.ex Compiled lib/phoenix/endpoint/adapter.ex Compiled lib/phoenix/endpoint.ex Compiled lib/phoenix/endpoint/cowboy_websocket.ex Compiled lib/phoenix/endpoint/handler.ex Compiled lib/phoenix/endpoint/cowboy_handler.ex Compiled lib/phoenix/endpoint/server.ex Compiled lib/phoenix/endpoint/watcher.ex Compiled lib/phoenix/exceptions.ex Compiled lib/phoenix/naming.ex Compiled lib/phoenix/pubsub.ex Compiled lib/phoenix/pubsub/gc.ex Compiled lib/phoenix/pubsub/local_supervisor.ex Compiled lib/phoenix/param.ex Compiled lib/phoenix/pubsub/pg2.ex Compiled lib/phoenix/pubsub/pg2_server.ex Compiled lib/phoenix/router/resource.ex Compiled lib/phoenix/router.ex Compiled lib/phoenix/router/scope.ex Compiled lib/phoenix/router/route.ex Compiled lib/phoenix/router/console_formatter.ex Compiled lib/phoenix/socket/message.ex Compiled lib/phoenix/pubsub/local.ex Compiled lib/phoenix/socket.ex Compiled lib/phoenix/endpoint/instrument.ex Compiled lib/phoenix/router/helpers.ex Compiled lib/phoenix/channel.ex Compiled lib/phoenix/controller.ex Compiled lib/phoenix/channel/server.ex Compiled lib/phoenix/endpoint/render_errors.ex Compiled lib/phoenix/controller/logger.ex Compiled lib/phoenix/supervisor.ex Compiled lib/phoenix/template.ex Compiled lib/phoenix/socket/transport.ex Compiled lib/phoenix/template/engine.ex Compiled lib/phoenix/template/exs_engine.ex Compiled lib/phoenix/template/eex_engine.ex Compiled lib/phoenix/template/html.ex Compiled lib/phoenix/token.ex Compiled lib/phoenix/transports/long_poll.ex Compiled lib/phoenix/test/conn_test.ex Compiled lib/phoenix/transports/serializer.ex Compiled lib/phoenix/transports/long_poll_serializer.ex Compiled lib/phoenix/test/channel_test.ex Compiled lib/phoenix/transports/long_poll_server.ex Compiled lib/phoenix/transports/websocket_serializer.ex Compiled lib/phoenix/transports/websocket.ex Compiled lib/phoenix/view.ex Generated phoenix app ==> phoenix_microsoftbot Compiled lib/microsoftbot_callback.ex Compiled lib/microsoftbot_phoenix_controller.ex Compiled lib/microsoftbot_responder.ex Compiled lib/microsoftbot_router.ex Generated phoenix_microsoftbot app ==> echo_bot Compiled lib/echo_bot.ex Compiled web/channels/user_socket.ex Compiled web/controllers/messages_controller.ex Compiled web/gettext.ex Compiled web/views/error_helpers.ex Compiled web/web.ex Compiled web/views/error_view.ex Compiled web/router.ex Compiled lib/echo_bot/endpoint.ex Generated echo_bot app Consolidated Plug.Exception Consolidated Poison.Decoder Consolidated Phoenix.Param Consolidated List.Chars Consolidated Poison.Encoder Consolidated String.Chars Consolidated Collectable Consolidated Enumerable Consolidated IEx.Info Consolidated Inspect -----> Creating .profile.d with env vars -----> Writing export for multi-buildpack support -----> Phoenix app detected -----> Loading configuration and environment Loading config... WARNING: phoenix_static_buildpack.config wasn't found in the app Using default config from Phoenix static buildpack Will use the following versions: * Node 5.3.0 Will export the following config vars: * Config vars DATABASE_URL * MIX_ENV=prod -----> Installing binaries Downloading node 5.3.0... Installing Node 5.3.0... Using default npm version -----> Building dependencies Installing and caching node modules npm ERR! Linux 3.13.0-100-generic npm ERR! argv "/tmp/build_6575dcd19e5156a329fc792402282b07/zabirauf-echo_phoenix_microsoftbot-855e368/.heroku/node/bin/node" "/tmp/build_6575dcd19e5156a329fc792402282b07/zabirauf-echo_phoenix_microsoftbot-855e368/.heroku/node/bin/npm" "prune" npm ERR! node v5.3.0 npm ERR! npm v3.3.12 npm ERR! path /tmp/build_6575dcd19e5156a329fc792402282b07/zabirauf-echo_phoenix_microsoftbot-855e368/package.json npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open '/tmp/build_6575dcd19e5156a329fc792402282b07/zabirauf-echo_phoenix_microsoftbot-855e368/package.json' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! /tmp/build_6575dcd19e5156a329fc792402282b07/zabirauf-echo_phoenix_microsoftbot-855e368/npm-debug.log ! Push rejected, failed to compile Phoenix app. ! Push failed
I tried it on the botV3 branch and it started correctly, there it's fixed
botV3
I tried to deploy to Heroku. It failed with that error. Looks like heroku is missing
package.json
. Maybe either adding an emptypackage.json
or somehow telling (inelixir_buildpack.config
?) heroku not to look for it would help.