so i have this code
"use strict";
const ps = require("prompt-sync");
const prompt = ps();
let base = prompt("base :");
let height = prompt("height:");
let area = (base * height / 2);
console.log(`The area of triangle is ${area}`);
When I run it in the terminal (node filename.js), the code works.
But when I run it in debug console, I got this error:
Uncaught Error Error: ENXIO: no such device or address, open '/dev/tty
Any idea why?