【问题标题】:Heroku app build using generator-angular-fullstack failing使用 generator-angular-fullstack 构建 Heroku 应用程序失败
【发布时间】:2015-05-08 19:28:28
【问题描述】:

我使用sudo grunt build 构建我的应用程序。没有错误。 dist 文件夹已构建,应用程序使用 sudo grunt serve:dist 运行良好。当我第一次尝试部署到 heroku 时,使用项目根目录中的yo angular-fullstack:heroku 失败。

我收到以下错误:

Initializing deployment repo
Creating heroku app and setting node environment
Creating myapp... done, stack is cedar-14

https://myapp.herokuapp.com/ | https://git.heroku.com/myapp.git

{ [Error: Command failed:  !    No app specified.
 !    Run this command from an app folder or specify which app to use with --app APP.
] killed: false, code: 1, signal: null }`

我还尝试按照http://davemax.com/heroku-deploy-yeoman-angular-app/https://devcenter.heroku.com/articles/getting-started-with-nodejs 上的手动构建说明进行操作。当我使用这些方法部署应用程序时,url 会显示一个 heroku 错误页面。

我的服务器是 HTTPS 服务器,所以我不确定这是否会干扰任何事情。

来自 app.js:

var options = {
  pfx: fs.readFileSync(__dirname + '/server.pfx'),
  passphrase: 'password'
};
// Setup server
var app = express();
var server = require('https').createServer(options, app);

我正在使用最新版本的 generator-angular-fullstack:2.0.13 版。我还在使用最新版本的 heroku 工具带:版本 3.28.2。我在 linux 机器上,ubuntu。

【问题讨论】:

  • 如果您还没有尝试过,请cd 进入dist 文件夹,然后再试一次
  • @AndrewKoroluk 感谢您的建议。我试过这个。我再次尝试并收到此消息:Just found a .yo-rc.json in a parent directory. Setting the project root at: /home/adam/Documents/dev/myapp。它只是尝试再次从项目根目录构建

标签: angularjs node.js heroku express angular-fullstack


【解决方案1】:

我正在为我的网站使用 generator-angular-fullstack,它运行良好。

我使用 git bash 并且我有我的 heroku 帐户 (https://devcenter.heroku.com/articles/authentication)

我总是使用:

$grunt build

$grunt buildcontrol:heroku

我想成为你的帮助。

【讨论】:

    猜你喜欢
    • 2015-09-16
    • 2016-09-28
    • 1970-01-01
    • 2018-04-14
    • 1970-01-01
    • 2019-07-13
    • 2021-11-16
    • 2016-03-28
    • 2015-10-23
    相关资源
    最近更新 更多