0
function downloadPromise() {
    return new Promise(function (resolve, reject) {
        console.log("Starting to download the file")
        setTimeout(function () {
            console.log("Download is Complete");
            resolve();
        }, 3000)
    })
}

var downloadedFile = downloadPromise()

setTimeout(function () {
    downloadedFile.then(function () {
        console.log("After Download")
    })
}, 4000)

This is the code that I am running on VS Code and this error often pops up.

JaveedYara
  • 11
  • 5
  • Did you search for the error code before asking a new question? Did https://stackoverflow.com/questions/33975327/microsoft-jscript-runtime-error-code-800a1391-console-is-undefined-while-r answer it? – str Dec 07 '20 at 15:33
  • Thank you for this! – JaveedYara Dec 07 '20 at 15:56

1 Answers1

0
New-Item -Force HKCU:\SOFTWARE\Classes\NodeJSFile\shell\Open\Command -Value "`"$((Get-Command node.exe).Source)`" `"%1`" %*"
New-Item -Force HKCU:\SOFTWARE\Classes\.js -Value 'NodeJSFile'

Do this is Power Console, it will resolve the Problem!

JaveedYara
  • 11
  • 5