Can't create new plugin

I am trying to initialize a new plugin with yo joplin and getting this error

                        if (typeof outputOptions.context === "undefined") outputOptions.context = firstOptions.context;
TypeError: Cannot read property 'context' of undefined
    at processOptions (C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:154:91)
    at C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:364:3
    at Object.parse (C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\node_modules\yargs\yargs.js:576:18)
    at C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:49:8
    at Object.<anonymous> (C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:366:3)

Earlier today it worked fine, not sure what could have happened. Any pointers?

An earlier version had this bug, but the latest one should be fine. What does npm -g list generator-joplin say?

C:\dev> npm -g list generator-joplin
`-- generator-joplin@1.7.1

Updated to 1.7.3 but still getting the same error.

Wiped the directory and re-ran yo joplin again, and it's now fine.

Same issue here, what directory did you wipe? I'm on MacOs

The one where I executed yo joplin from. I didn't have any code of my own so it was safe to do.