/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
/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