Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mahsanr44's avatar

Duplicate identifier 'prompt' in typescript

Trying to import prompt-sync in typescript but getting error duplicate identifier.

var prompt = require('prompt-sync')();

let number = Number(prompt("Enter Number: "));

I installed the prompt-sync library but still getting this error...

0 likes
1 reply
Sinnbeck's avatar

Show the full error. We cannot guess based on two lines of code

Please or to participate in this conversation.