我一直在關注官方文檔,將Elixir版本1.3.0的phoenix 1.2.0應用推送到Heroku,但得到以下錯誤。我正在嘗試將一個鳳凰應用部署到heroku,但得到一個NPM錯誤
remote: Generated pages app
remote: -----> Creating .profile.d with env vars
remote: -----> Writing export for multi-buildpack support
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: Will use the following versions:
remote: * Node 5.3.0
remote: Will export the following config vars:
remote: * Config vars DATABASE_URL
remote: * MIX_ENV=prod
remote:
remote: -----> Installing binaries
remote: Downloading node 5.3.0...
remote: Installing Node 5.3.0...
remote: Using default npm version
remote:
remote: -----> Building dependencies
remote: Installing and caching node modules
remote: npm WARN ENOENT ENOENT: no such file or directory, open '/tmp/build_f2aec913d61d8c51889992d9346679be/package.json'
remote: npm WARN EPACKAGEJSON build_f2aec913d61d8c51889992d9346679be No description
remote: npm WARN EPACKAGEJSON build_f2aec913d61d8c51889992d9346679be No repository field.
remote: npm WARN EPACKAGEJSON build_f2aec913d61d8c51889992d9346679be No README data
remote: npm WARN EPACKAGEJSON build_f2aec913d61d8c51889992d9346679be No license field.
remote: npm ERR! Linux 3.13.0-93-generic
remote: npm ERR! argv "/tmp/build_f2aec913d61d8c51889992d9346679be/.heroku/node/bin/node" "/tmp/build_f2aec913d61d8c51889992d9346679be/.heroku/node/bin/npm" "--unsafe-perm" "prune"
remote: npm ERR! node v5.3.0
remote: npm ERR! npm v3.3.12
remote: npm ERR! path /tmp/build_f2aec913d61d8c51889992d9346679be/package.json
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/build_f2aec913d61d8c51889992d9346679be/package.json'
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_f2aec913d61d8c51889992d9346679be/npm-debug.log
remote: ! Push rejected, failed to compile Phoenix app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
這是elixir_buildpack.config
elixir_version=1.3.0
的內容是什麼可能是錯誤的原因的任何暗示?
是你的節點5.3+和npm 3 +。你可以嘗試更新你的節點版本嗎? – TheAnh
我已經添加了phoenix_static_buildpack.config文件來設置節點和npm版本爲6.0.0和3.8.6,以便它們可以匹配我在dev中使用的版本。但是我得到相同的錯誤/ – jlfenaux