NPM Cannot read property '0' of undefined

Small quick tip

I had this issue on an open source project I was trying to work on.
After some googling, i found a solution

I removed both node_modules and package-lock.json and then did:

npm install  

Then I could run gulp without any issues again