TypeError: Cannot read property 'isTTY' of undefined

See original GitHub issue

I am trying to implement a group video chat, I have tried with the latest version 3.13.1 and downgrade until 3.11.0 but all of them give the same error. I’ve also tried with version 2.11.1 and the error stopped but the function require(‘twilio’).jwt.AccessToken; returned null in v2x

Version:

Code Snippet

# import * as twilio from 'twilio';

### Exception/Log

<place exception/log here> image

package.json image

ReactJS Screen Log image


### Steps to Reproduce
1. Intall using npm install twilio --save
2.Install npm install twilio-video --save
3. import * as twilio from 'twilio';
4. var AccessToken = require('twilio').jwt.AccessToken;

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
jkottapacommented, Aug 23, 2018

hey @m1729 if you are building using ReactJS, here is how we were able to resolve it In the public index.html we listed this as a script:

<script type="text/javascript" src="//media.twiliocdn.com/sdk/js/client/v1.4/twilio.min.js"></script>

And in the React components (or anywhere in React) you can do this: let Twilio = window.Twilio;

0reactions
m1729commented, Aug 17, 2018

Ok. Thank you for your silent help. Downgrade to 2.11.1 version and little code redesign solves the problem. Still eager to see the solution for the latest release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'isTTY' of undefined
I have installed twilio latest version in my angular project. But when the project runs, it says that "Cannot read property 'isTTY' of...
Read more >
Cannot read property 'isTTY' of undefined · Issue #1078 - GitHub
I just upgraded to node v0.3.6, and when I run coffee, I get this error: TypeError: Cannot read property 'isTTY' of undefined at...
Read more >
Cannot read property 'isTTY' of undefined (NodeVM)
Hey,. I trying to run the nestjs in the VM.. I used webpack to compile into single file that I can run it...
Read more >
Process | Node.js v19.3.0 Documentation
The process.argv0 property stores a read-only copy of the original value of argv[0] passed when Node.js starts. $ bash -c 'exec -a customArgv0...
Read more >
Node.js readStream.isTTY Property - GeeksforGeeks
isTTY property is an inbuilt application programming interface of class ReadStream within tty module which is used to check if the read ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found