twilio-labs / plugin-rtc

Twilio CLI plugin which supports developing and deploying real-time communication apps
Apache License 2.0
38 stars 22 forks source link

ReferenceError: Twilio is not defined #118

Open mhadad opened 1 year ago

mhadad commented 1 year ago

/node_modules/@twilio-labs/plugin-rtc/src/serverless/functions/token.js:4 const AccessToken = Twilio.jwt.AccessToken; ^ ReferenceError: Twilio is not defined

The above is what I'm getting for the following lines: import as Twilio from 'twilio'; import as TwilioToken from '@twilio-labs/plugin-rtc/src/serverless/functions/token';

dotenv.config(); const tokenFunction: ServerlessFunction = TwilioToken.handler; so how can I fix this? Thanks