Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unconfigured Twilio causes error #348

Closed
seanogdev opened this issue Sep 27, 2020 · 2 comments · Fixed by #349
Closed

Unconfigured Twilio causes error #348

seanogdev opened this issue Sep 27, 2020 · 2 comments · Fixed by #349
Assignees

Comments

@seanogdev
Copy link
Contributor

seanogdev commented Sep 27, 2020

Description

Issue caused by #344

node_modules/twilio/lib/rest/Twilio.js:130
    throw new Error('username is required');
          ^
Error: username is required
    at new Twilio (node_modules/twilio/lib/rest/Twilio.js:130:11)
    at Object.initializer [as default] (node_modules/twilio/lib/index.js:9:10)
    at Object.<anonymous> (src/notification/twilio.ts:8:22)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Module.m._compile (node_modules/ts-node/src/index.ts:1043:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Object.require.extensions.<computed> [as .ts] node_modules/ts-node/src/index.ts:1046:12)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Module.require (internal/modules/cjs/loader.js:965:19)

Possible solution

Making the twilio integration run conditionally based on the existence of TWILIO_ACCOUNT_SID. Turns out the solution was to wait until invocation of sendTwilioMessage to create the client

@Kommeh
Copy link

Kommeh commented Sep 27, 2020

Same issue here after the Twilio addition. It only errors out now.

@JeffBuss
Copy link

Same issue here, and my Twilio should be configured properly. Pull request looks like it'll fix it, though.

@jef jef closed this as completed in #349 Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants