Postcss error: Der Befehl "C:\Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden

I took me quite a while to find the solution to this problem. The main issue was that I could not find anything about the following, part English, part German, error message:

Error: Error building site: POSTCSS: failed to transform "tw.css" (text/css): Der Befehl "C:\Program" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

The solution can be found in the github issue #7333.

The problem was that the project was in a directory that had a space in its path name. The solution is to put the content of the postcss.config.js in the package.json file (see github issue) or to put the project in a folder that does not have a space in its file name.

It seems trivial, but gave me quite some headache, I hope it is ok to leave a note in this forum.