-1

npm ERR! peer dep missing: yeoman-environment@^3.2.0, required by yeoman-generator@5.4.1

When I check the list of npm package available with command 'npm list -g --depth=0', I get the above mentioned error.

Can someone please help me understand it?

  • Can you run `npm install yeoman-environment`? – esqew Aug 16 '21 at 13:56
  • Thanks esqew. yeah before trying that I wanted to understand what did I miss that I have to install yeoman-environment separately? I am new to yeoman and related stuff. Just followed guidelines to install yo and generator-code. Wasn't that enough? – shantanu ghosh Aug 16 '21 at 14:04
  • In certain versions of `npm`, peer dependencies aren't installed by default. If you're seeing errors about it, you'd have to install them manually *or* update to the latest major release of `npm`. – esqew Aug 16 '21 at 14:07
  • I got a few warning -- npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. But it looked like I got it installed. + yeoman-environment@3.5.1 added 343 packages from 261 contributors and audited 343 packages in 130.74s Bt I stl get same previ error. – shantanu ghosh Aug 16 '21 at 14:44

1 Answers1

0

It is resolved now. I have uninstalled yo and generator-code first. Then I have updated nodejs and npm version to LTS version. Then again installed yo and generator-code. It gave the same warning that required yeoman-environment was missing. I have installed yeoman-environment. Now everything is alright. I am able to use yo and generator-code.