System.IO.StreamReader error for packaged script, but no stream being used?

I have packaged up the following script as an exe as I have this weird error that makes no sense.

$Input = Read-Host "Please Provide some text...."

Write-Host "Value : $($Input)"

Read-Host "Press any key to exit..."

When using the PowerShell Tools Packager (Visual Studio Code) this returns the following error;

Not sure how to resolve this or what’s causing this

Not sure it’s related but you should not use $input, it’s an automatic variable.