For anyone who runs into this trying to debug this error on why npm run <script> doesn’t work on Windows for things in node_modules/.bin/ such as gulp, it relates to the fact that npm is using cmd.exe instead of bash for the child.
You can fix this with NPM 5.1.0+ using npm config set script-shell bash