twilio-infra-as-code / plugin-twilio-infra

Plugin for the Twilio CLI to integrate Pulumi and Twilio in order to create, deploy, and manage Twilio infrastructure using code.
MIT License
1 stars 4 forks source link

Seeing 'Could not find profile "undefined"' error despite profile existing and active #34

Open nicduke38degrees opened 1 year ago

nicduke38degrees commented 1 year ago
nic ~/webapps/twilio-serverless-poc  $ twilio profiles:list
ID                Account SID                         Active
nic-personal-dev  AC2d5fe89efc5afb02e36fec4714256569  true  
nic               AC2d5fe89efc5afb02e36fec4714256569  false 
nic-test          AC2d5fe89efc5afb02e36fec4714256569  false 
nic ~/webapps/twilio-serverless-poc  $ twilio profiles:use nic-test
set "nic-test" as active profile
twilio-cli configuration saved to "/Users/nic/.twilio-cli/config.json"
nic ~/webapps/twilio-serverless-poc  $ twilio infra:new            
 » Could not find profile "undefined".
 » To create the profile, run:

  twilio profiles:create

Alternatively, twilio-cli can use credentials stored in environment variables:

# OPTION 1 (recommended)
TWILIO_ACCOUNT_SID = your Account SID from twil.io/console
TWILIO_API_KEY = an API Key created at twil.io/get-api-key
TWILIO_API_SECRET = the secret for the API Key

# OPTION 2
TWILIO_ACCOUNT_SID = your Account SID from twil.io/console
TWILIO_AUTH_TOKEN = your Auth Token from twil.io/console

Once these environment variables are set, a twilio-cli profile is not required to move forward with installation.
 ›   Error: EEXIT: 1
 ›   Code: EEXIT
rg-pionix commented 1 year ago

@nicduke38degrees I had the same issue and it's due to the twilio-cli dependency in the package.json being outdated. I solved the issue by forking the project, updating the dependency to its latest version and linking the plugin locally to the Twilio CLI.

Ramonrocha1989 commented 1 year ago

I have the same error can someone explain better how to solve it? Thanks!!

rg-pionix commented 1 year ago

@Ramonrocha1989 the following dependency in package.json is outdated: "@twilio/cli-core": "^4.3.3" You would need to fork the project, update the dependency yourself and link the plugin locally to be used by Twilio CLI.

stevenbdf commented 8 months ago

@Ramonrocha1989 the following dependency in package.json is outdated: "@twilio/cli-core": "^4.3.3" You would need to fork the project, update the dependency yourself and link the plugin locally to be used by Twilio CLI.

Thanks for making the fork. I've cloned it and used twilio plugins:link, works like a charm