Full error from the terminal:
* Executing task: npm run build
/usr/bin/env: ‘bash\r’: No such file or directory
* The terminal process "/usr/bin/bash '-c', 'npm run build'" failed to launch (exit code: 127).
* Terminal will be reused by tasks, press any key to close it.
No tasks.json.
Writing them into the terminal works fine.
An example of such a task:
...
"start": "webpack-dev-server",
...
I guess there's a problem in how a new terminal is created upon a new execution try.