Temporary solution
Run npm install manually when the yoman task runs - no problem.
Permanent solution
It is best to upgrade your npm tool. Open cmd as an administrator and navigate to the nodejs folder, on Windows this is typically C:\Program Files\nodejs or C:\Program Files (x86)\nodejs . Then run npm install npm@next and check the version of npm -v (here you can check the current version).
If this is not possible, for example. due to permissions, you can install the new version of npm in a different directory and then replace the old version with the new version.
Remember the installation with the -g flag: the default for a global installation on Windows is% %APPDATA%/npm by default, not the nodejs installation folder - if you install it this way, you need to move the npm files to it.
I also recommend backing up your original npm files, and in case of failure to restore them, it is better to save than sorry.
source share