I saw a couple of closed issues in the tracker that mentioned this so not sure if there is a bug or it's just my setup. Thought it worth noting anyhow in case anyone else comes across it.
I'm using Debian Stretch and was using Postgres 9.6 but kept getting errors:
1) Grunt shifter wouldn't run
2) Atto toolbar and other links just failed when jscache was disabled
Now I've switched to mariadb and just installed 3.4 as well and both problems have resolved themselves after re-installing npm and grunt-cli in the new moodle root.
It's worth noting that this was repeatable: after the first time it happened I did a complete server and Moodle 3.3.2+ re-install from scratch with Stretch and Postgres and got exactly the same errors noted above.