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

function Prompt(prompt) is defined twice #394

Closed
birdlavv opened this issue Nov 9, 2018 · 4 comments
Closed

function Prompt(prompt) is defined twice #394

birdlavv opened this issue Nov 9, 2018 · 4 comments
Labels
type: bug bug in the library type: twilio enhancement feature request on Twilio's roadmap

Comments

@birdlavv
Copy link

birdlavv commented Nov 9, 2018

Version: 3.23.2

Code Snippet

function Prompt(prompt) {
  this.prompt = prompt;
  this._propertyName = 'prompt';
}

is defined twice in https://github.com/twilio/twilio-node/blob/master/lib/twiml/VoiceResponse.js

Steps to Reproduce

line 362
line 833

Exception/Log

{"readyState":"ERROR","errorCode":"BUILD_FAILED"}
{ SyntaxError: Identifier 'Prompt' has already been declared (833:9) in /tmp/45f91855/user/node_modules/twilio/lib/twiml/VoiceResponse.js
@pushplay
Copy link

pushplay commented Jun 4, 2019

This bug still exists in v3.31.1.

https://github.com/twilio/twilio-node/blob/master/lib/twiml/VoiceResponse.js#L419
https://github.com/twilio/twilio-node/blob/master/lib/twiml/VoiceResponse.js#L962

This is a sticking point in babel. Is there a workaround for this?

The file is generated so I can't submit a PR for the trivial fix. :(

pushplay pushed a commit to Giftbit/lightrail-edhi that referenced this issue Jun 4, 2019
@childish-sambino
Copy link
Contributor

Also note this is preventing JSDoc upgrades in the lib itself. Working to get it prioritized.

Looks like the code generator needs to recognize that same class already exists and not write it multiple times. Not sure yet how big a refactor this will be. Will circle back here when I have an update.

@saibotsivad
Copy link

Still an issue in 3.33.3 @childish-sambino any updates on this? It's now blocking Twilio integration into our API. Thanks in advance for any news / advice!

@childish-sambino
Copy link
Contributor

WIP by @thinkingserious

@childish-sambino childish-sambino added the type: twilio enhancement feature request on Twilio's roadmap label Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug bug in the library type: twilio enhancement feature request on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

4 participants