2
1

More than 1 year has passed since last update.

Salesforce DX を使用したアプリケーション開発

Last updated at Posted at 2022-01-31

アプリケーション作成の準備

sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch

を実行するとエラーが出ます。

This command requires a dev hub org username set either with a flag or by default in the config.

何かよく分からん。探すとここに回避策がある。ありがたい。

【Salesforce】デモのE-Bikes Lightning Web Components をローカルに導入できた件Part1【Salesforce DX/Sandbox/DevHub】

これを先に実行してから、先ほどのコマンドを入力すると機能した。

sfdx force:auth:web:login -d -a DevHub
sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch

同じ質問を集めてみました。

Authorize the CLI to work with your DevHub by typing:
次のように入力して、CLIがDevHubと連携することを承認します。

sfdx force:auth:web:login -h

This will automatically open your browser and prompt you to log in to the dev hub. Use the credentials that you used to create the Salesforce DX authorized dev hub. Click Allow when the Oauth Flow prompts you to.
これにより、ブラウザが自動的に開き、開発ハブにログインするように求められます。 SalesforceDX認定開発ハブの作成に使用したクレデンシャルを使用します。 Oauthフローからプロンプトが表示されたら、[許可]をクリックします。

Once you’ve gone through this authorization process you can set up an alias using the following command
この承認プロセスを完了すると、次のコマンドを使用してエイリアスを設定できます

sfdx force:auth:web:login -d -a DevHub

You should see something like:

Successfully authorized <your-username> with org id 00B1I000000L9r3UCY

You may now close the browser

Now you should be able to open the dev hub using this

sfdx force:org:open -u DevHub

It finally works - I think what worked is checking what is set as a default username
sfdx config:get defaultusername
then setting new alias for that username
sfdx alias:set my-hub-org=
then finally
cci flow run dev_org --org dev

sfdx force:auth:web:login -d -a DevHub

このコマンドを先に実行するといいみたい。
ERROR running force:org:create: Missing message org_create:RequiresDevhubUsernameError for locale en_US.

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1