Error while building datasource plugin tutorial project

I’ve also had this issue on this combination and manually changing
if (path.basename(pwd) === 'grafana-toolkit') {
to
if (pwd && path.basename(pwd) === 'grafana-toolkit') {
in node_modules\@grafana\toolkit\bin\grafana-toolkit.js fixes the issue for me. I believe the pwd variable is not set on Powershell: https://github.com/nodejs/help/issues/1881