The prompt thing is not working in javascript

Bug description:

Expected vs Current Behavior:

Steps to reproduce:

Bug appears at this link: https://replit.com/~?supportform=true

Screenshot(s)/Screen Recording:

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

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

prompt is not a function in Node.js. That is only a function in website JavaScript. Its usual functionality would be to make a popup with a textbox. However, you cannot make popups in Node.js because it’s a server, like a console or terminal window. So in order to achieve similar functionality, you’ll need to write this at the very top of your Node.js code:

const prompt = require("prompt-sync")()

Make sure to install the prompt-sync module. (lmk if you don’t know how to)

2 Likes