【发布时间】: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