错误的ERR!缺少脚本:将phoenix项目推送到dokku时启动错误

时间:2016-01-02 19:00:55

标签: npm phoenix-framework dokku

我试图在digitalocean上的dokku上设置一个新的干净凤凰框架项目(v 1.1.1)。

我首先收到此错误消息:

=====> phoenix container output:
       npm ERR! Linux 3.13.0-71-generic
       npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
       npm ERR! node v5.1.1
       npm ERR! npm  v3.3.12
       npm ERR! missing script: start
       npm ERR!
       npm ERR! If you need help, you may report this error at:
       npm ERR!     <https://github.com/npm/npm/issues>
       npm ERR! Please include the following file with any support request:
       npm ERR!     /app/npm-debug.log
=====> end phoenix container output

但后来我想/我需要将"scripts": { "start":添加到package.json 像这样:

{
  "repository": {
  },
  "dependencies": {
    "babel-brunch": "^6.0.0",
    "brunch": "^2.0.0",
    "clean-css-brunch": ">= 1.0 < 1.8",
    "css-brunch": ">= 1.0 < 1.8",
    "javascript-brunch": ">= 1.0 < 1.8",
    "uglify-js-brunch": ">= 1.0 < 1.8"
  },
  "scripts": {
    "start": "node server.js"
  }
}

但我不明白我应该指向节点的哪个/哪个文件?还有其他人有同样的错误消息吗?

1 个答案:

答案 0 :(得分:2)

您是否关注指南或教程?它看起来像你想要启动一个节点容器,而不是elixir / phoenix?

无论如何,我最近刚为凤凰城的数字海洋设立了一个dokku。我是按照本指南做的:http://blog.praveenperera.com/deploying-phoenix-applications-using-dokku/

如果您遇到困难或需要帮助,请告诉我们。)