TS18026
'#!' can only be used at the start of a file.
Broken Code ❌
console.log('Hello, World!');
#!/usr/bin/env nodeThis error occurs because the #! (shebang) syntax, used to indicate that a file is an executable script, must appear at the very beginning of the file.
Fixed Code ✔️
To fix this, place the #! shebang at the top of the file before any other code:
#!/usr/bin/env node
console.log('Hello, World!');