これはSF(v2)の移行時の問題かな?
1つの正解
18:06:18.15 sfdx force:auth:web:login --setalias myDevOrg --instanceurl https://login.salesforce.com --setdefaultusername
(node:30340) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.
(Use node --trace-warnings ...
to show where the warning was created)
Warning: The "force auth web login" command has been deprecated. Use "org login web" instead.
Warning: The "--setalias" flag has been deprecated. Use "--alias | -a" instead.
Warning: The "--instanceurl" flag has been deprecated. Use "--instance-url | -r" instead.
Warning: The "--setdefaultusername" flag has been deprecated. Use "--set-default | -s" instead.
Error (1): spawn UNKNOWN
18:06:20.765 sfdx force:auth:web:login --setalias myDevOrg --instanceurl https://login.salesforce.com --setdefaultusername
ended with exit code 1
I finally found the answer. it was because of my company security policy.
For your references :
If your organization limits the system environment variable, you may try below.
System properties > Environment Variables > System Variables. Click "New".
Variable name : NODE_TLS_REJECT_UNAUTHORIZED
Variable value : 0
1つめ
- Trying to authorize an org in VSCode for Create a Hello World Lightning Web Component
- I am having this issues after reinstallation also. Can anyone solve this issue so that I can complete my trailhead challenge
- Constantly getting this error cant fix it with even after trying numerous things... HELP
(node:10496) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.
(Use node --trace-warnings ...
to show where the warning was created)
Warning: The "force auth web login" command has been deprecated. Use "org login web" instead. Warning: The "--setalias" flag has been deprecated. Use "--alias | -a" instead. Warning: The "--instanceurl" flag has been deprecated. Use "--instance-url | -r" instead. Warning: The "--setdefaultusername" flag has been deprecated. Use "--set-default | -s" instead. Error (1): spawn UNKNOWN 11:55:21.214 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 1
I was recently experiencing this. I did an sfdx update and then reauthed my org.
$ sfdx force:auth:web:login --setalias my-super-awesome-alias --instanceurl https://test.salesforce.com --setdefaultusername
https://salesforce.stackexchange.com/questions/403778/sfdx-authorize-an-org-failed-to-run
2つめ
Please check this article.
SFDX_JSON_TO_STDOUT
Sends messages when Salesforce CLI commands fail to stdout instead of stderr. Setting this environment variable to true is helpful for scripting use cases.
Example:
SFDX_JSON_TO_STDOUT=true
3つめ
16:08:35.733 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
(node:14117) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.
(Use node --trace-warnings ...
to show where the warning was created)
Warning: The "force auth web login" command has been deprecated. Use "org login web" instead.
Warning: The "--setalias" flag has been deprecated. Use "--alias | -a" instead.
Warning: The "--instanceurl" flag has been deprecated. Use "--instance-url | -r" instead.
Warning: The "--setdefaultusername" flag has been deprecated. Use "--set-default | -s" instead.
Error (1): Invalid client credentials. Verify the OAuth client secret and ID. Error authenticating with auth code due to: request to https://login.salesforce.com//services/oauth2/token failed, reason: connect ETIMEDOUT 13.110.249.224:443
16:11:07.451 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
ended with exit code 1