首页 > 解决方案 > 错误 - 使用 Dart Buildpacks 设置 Heroku 环境

问题描述

我尝试使用以下命令创建应用程序:

heroku create — buildpack https://github.com/stablekernel/heroku-buildpack-dart.git

但我收到一个错误:

Creating ⬢ https://github.com/stablekernel/heroku-buildpack-dart.git... !
 !    Name must start with a letter, end with a letter or digit and can only contain lowercase letters, digits, and
 !    dashes. Name is too long (maximum is 30 characters)

我该如何解决这个问题?

我正在尝试构建自己的 Telegram 机器人。

参考: https ://medium.com/@viceconti.federico/how-to-deploy-your-telegram-bot-on-heroku-with-teledart-6ee197c0df91

标签: herokutelegram-bot

解决方案


在不用于代码的平台上编写编程博客的问题之一是它们有时会重新格式化内容以提供帮助。

该命令不应该是

heroku create — buildpack https://github.com/stablekernel/heroku-buildpack-dart.git

反而

heroku create --buildpack https://github.com/stablekernel/heroku-buildpack-dart.git

请注意--buildpack,其中--表示herokuCLI 的一个选项。


推荐阅读