如何在我的Websockets文件中添加-a -app? [英] How to add -a -app in my Websockets file?

查看:70
本文介绍了如何在我的Websockets文件中添加-a -app?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Heroku上上传项目时遇到问题.我正在尝试更改socket.io和MongoUrl的值,但出现此错误:

I've got a problem when I upload my project on Heroku. I've trying changing value of socket.io and MongoUrl, but I get this error:

Error: Missing required flag:
›     -a, --app APP  app to run command against

推荐答案

这与您的任何文件都没有关系.您必须向Heroku CLI本身提供一个参数,例如

This has nothing to do with any of your files. It's an argument that you must provide to the Heroku CLI itself, e.g.

heroku config:set SOME_VARIABLE=some_value -a myapp

其中myapp是Heroku应用程序的名称.

where myapp is the name of your Heroku app.

如果heroku无法确定要连接的应用程序,则可能需要-a/--app自变量,原因是没有配置 Heroku远程,或者是因为配置了一个Heroku遥控器.

The -a / --app argument is required when heroku can't figure out what app to connect to, either bcause there is no Heroku remote configured or because there is more than one Heroku remote configured.

另请参见如何在heroku CLI中避免使用--app选项?

这篇关于如何在我的Websockets文件中添加-a -app?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆