I got : TypeError: url.URL is not a constructor running examples with my account parameters
Problem
Hello, I tried to run several examples from https://www.twilio.com/docs/libraries/node and running code (with my account sid/token) [code block] I got error : `TypeError: url.URL is not a constructor ` I tried to debug this issue in Twilio.js:258 and found : https://prnt.sc/w79oys and ref to undefined element https://prnt.sc/w79pqi and I see ref 10 years old https://prnt.sc/w79q4s can it be reason of my error and why so ? I tried version of twilio 3.54.1 (latest) and 3.54.0 but I have the same error and the same data I see debugging... In my OS : [code block] Why so and how it can be fixed ? Thanks!
Error Output
error : `TypeError: url.URL is not a constructor
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: I got : TypeError: url.URL is not a constructor running examples with my account parameters
Hi @karthik22061993 Our library does not currently support node: 15.5.0. Please see here for the node versions we support. I would start off by verifying that you are running a supported node version that includes the `URL` class, which has been available since Node v6.13.0 (reference). Also check out issue 577 it looks like this error is related to defunctzombie/node-url#37.
Trust Score
2 verifications
- 1
Hi @karthik22061993
Our library does not currently support node: 15.5.0. Please see here for the node versions we support. I would start off by verifying that you are running a supported node version that includes the `URL` class, which has been available since Node v6.13.0 (reference). Also check out issue 577 it looks like this error is related to defunctzombie/node-url#37.
Validation
Resolved in twilio/twilio-node GitHub issue #639. Community reactions: 1 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep