Prompt is not working

Bug description:
prompt is not working

Expected vs Current Behavior:

Steps to reproduce:

Bug appears at this link: https://replit.com/~

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0

Replit Profile: https://replit.com/@ranjanaalone103

Welcome to the forums @ranjanaalone103!
To gain the ability to use prompt in Replit, you will need to use the prompt-sync library. Just put this line of code at the start of your JS file:

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

After this slight update, you should be able to use prompt() like normal.

5 Likes