Node.js I';我正试图将phoenix应用程序部署到heroku,但出现NPM错误
我一直在按照官方文档将使用Elixir版本1.3.0的an phoenix 1.2.0应用程序推送到Heroku,但出现以下错误Node.js I';我正试图将phoenix应用程序部署到heroku,但出现NPM错误,node.js,heroku,elixir,phoenix-framework,Node.js,Heroku,Elixir,Phoenix Framework,我一直在按照官方文档将使用Elixir版本1.3.0的an phoenix 1.2.0应用程序推送到Heroku,但出现以下错误 remote: Generated pages app remote: -----> Creating .profile.d with env vars remote: -----> Writing export for multi-buildpack support remote: -----> Phoenix app detected remot
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
关于错误原因的任何提示?如果要覆盖默认值,请在应用程序的根目录中创建phoenix_static_buildpack.config文件。该文件的语法是bash 如果未指定配置选项,则将使用buildpack的phoenix\u static\u 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=.
这里是完整的项目缺少package.json和brunch-config.js。添加这些文件解决了这个问题 是你的节点5.3+和npm 3+。你能尝试更新你的节点版本吗?我添加了一个phoenix_static_buildpack.config文件,将节点和npm版本设置为6.0.0和3.8.6,以便它们可以匹配我在开发中使用的版本。但是我得到了相同的错误/我已经有一个错误来设置节点和npm版本。不幸的是,设置其他选项并没有改变任何事情。有人知道是否可以跳过所有前端内容吗?我不提供任何HTML?既然brunch-config.js和package.js位于
/apps
的较低目录中,如何使用伞式应用程序实现这一点?