🌐

ngrok 起動しない?

2024/11/06に公開

tokenが必要らしい?

Udemyの講座でngrokが必要な画面があったがコマンドを実行してもエラーが出た???

https://www.npmjs.com/package/ngrok

jboy422@Jboy422 nextjs-15-15-sns % ngrok http 3000
http - start an HTTP tunnel
USAGE:
  ngrok http [address:port | port] [flags]
AUTHOR:
  ngrok - <support@ngrok.com>
COMMANDS:
  config          update or migrate ngrok's configuration file
  http            start an HTTP tunnel
  tcp             start a TCP tunnel
  tunnel          start a tunnel for use with a tunnel-group backend
EXAMPLES:
  ngrok http 80                                                 # secure public URL for port 80 web server
  ngrok http --url baz.ngrok.dev 8080                           # port 8080 available at baz.ngrok.dev
  ngrok tcp 22                                                  # tunnel arbitrary TCP traffic to port 22
  ngrok http 80 --oauth=google --oauth-allow-email=foo@foo.com  # secure your app with oauth
Paid Features:
  ngrok http 80 --url mydomain.com                              # run ngrok with your own custom domain
  ngrok http 80 --cidr-allow 2600:8c00::a03c:91ee:fe69:9695/32  # run ngrok with IP policy restrictions
  Upgrade your account at https://dashboard.ngrok.com/billing/subscription to access paid features
Upgrade your account at https://dashboard.ngrok.com/billing/subscription to access paid features
Flags:
  -h, --help      help for ngrok
Use "ngrok [command] --help" for more information about a command.
ERROR:  authentication failed: The authtoken you specified is properly formed, but it is invalid.
ERROR:  Your authtoken: oSKTFSKBzqAZJTu6ZeIUf6aL8y_6nvS6iTpJzUuiidwNAtxR
ERROR:  This usually happens when:
ERROR:      - You reset your authtoken
ERROR:      - Your authtoken was for a team account that you were removed from
ERROR:      - You are using ngrok link and this credential was explicitly revoked
ERROR:  Go to your ngrok dashboard and double check that your authtoken is correct:
ERROR:  https://dashboard.ngrok.com/get-started/your-authtoken
ERROR:
ERROR:  ERR_NGROK_107
ERROR:  https://ngrok.com/docs/errors/err_ngrok_107
ERROR:
jboy422@Jboy422 nextjs-15-15-sns %

dashboard.ngrok.comdashboard.ngrok.com
ngrok - Online in One Line
ngrok is the fastest way to put anything on the internet with a single command.

dashboard.ngrok.comdashboard.ngrok.com
ngrok - Online in One Line
ngrok is the fastest way to put anything on the internet with a single command.

ngrok.comngrok.com
ERR_NGROK_107 | ngrok documentation

このページでトークンを取得して、コマンドを実行する必要があった。

こんな感じのコマンドを実行すると成功した✨

ngrok config add-authtoken 2oSKTFSKBzqAZJTu6ZeIUf*********************

Discussion