2016-08-23 4 views
1

Heroku에 Elixir 1.3.0 버전을 사용하여 phoenix 1.2.0 앱을 푸시하기 위해 공식 문서를 따르지 만 다음 오류가 발생합니다.heroku에 phoenix 앱을 배포하려고하지만 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 

의 내용이다 오류의 원인 일 수 있습니다 무엇에 대한 어떤 힌트?

+1

노드 5.3+ 및 npm 3 +입니다. 노드 버전을 업데이트하려고합니까? – TheAnh

+0

phoenix_static_buildpack.config 파일을 노드 및 npm 버전을 6.0.0 및 3.8.6으로 설정하여 dev에서 사용하는 버전과 일치시킬 수 있도록 추가했습니다. 하지만 같은 오류가 발생합니다/ – jlfenaux

답변

2

이 프로젝트는 package.json과 브런치-config.js 부족 완료 :

여기에 사용 가능한 모든 옵션을 전체 설정 파일입니다. 이러한 파일을 추가하면 문제가 해결됩니다.

+0

프론트 엔드 물건을 모두 건너 뛸 수 있는지 아는 사람은 누구입니까? 나는 어떤 HTML도 서버하지 않습니까? –

+0

brunch-config.js와 package.js가'/ apps'의 하위 디렉토리에 있기 때문에 우산 앱으로 어떻게 처리 할 수 ​​있습니까? – DogEatDog

1

기본값을 무시하려면 앱의 루트 디렉토리에 phoenix_static_buildpack.config 파일을 만드십시오. 파일의 구문은 bash입니다.

config 옵션을 지정하지 않으면 buildpack의 phoenix_static_buildpack.config 파일의 기본 옵션이 사용됩니다.

다음
# Clean out cache contents from previous deploys 
clean_cache=false 

# We can change the filename for the compile script with this option 
compile="compile" 

# Add the config vars you want to be exported here 
config_vars_to_export=(DATABASE_URL) 

# We can set the version of Node to use for the app here 
node_version=5.3.0 

# We can set the version of NPM to use for the app here 
npm_version=2.10.1 

# We can set the path to phoenix app. E.g. apps/phoenix_app when in umbrella. 
phoenix_relative_path=. 

instructions

+0

이미 노드와 npm 버전을 설정했습니다. 불행히도 다른 옵션을 설정해도 아무 것도 변경되지 않았습니다. – jlfenaux

관련 문제