Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! missing: yeoman-generator@^4.10.1, required by yeoman-environment@2.10.1 #1240

Closed
avizov opened this issue May 14, 2020 · 3 comments
Labels
needs triage Awaiting triage

Comments

@avizov
Copy link

avizov commented May 14, 2020

I have a node package that requires "yeoman-generator" version "4.10.0" and "yeoman-environment" version "2.8.1".
The "yeoman-generator"@4.10.0 requires "yeoman-environment" version "^2.9.5" (actually install "_id": "yeoman-environment@2.10.1") which requires "yeoman-generator": "^4.10.1" and this cycling bring us for following errors in our WhiteSource scan:

whitesource run -c whitesource.config.json.fb7464e48e13d0239b7b3a436b2a367b
20:47:24 OK: Config file is located in: whitesource.config.json.fb7464e48e13d0239b7b3a436b2a367b
20:47:24 OK: Running whitesource V20.3.2...
20:47:27 npm ERR! extraneous: yeoman-generator@4.10.1 /home/jenkins/agent/workspace/erator_s4_ext_voter_upd-ui5-base/node_modules/yeoman-generator/node_modules/yeoman-generator
20:47:27 npm ERR! missing: yeoman-generator@^4.10.1, required by yeoman-environment@2.10.1
20:47:27 ERROR: 'npm ls' command failed Make sure to run 'npm install' prior to running the plugin. Please resolve the issue and rerun the scan operation.
Please explain how to resolve this cycling dependency...

@avizov avizov added the needs triage Awaiting triage label May 14, 2020
@mshima
Copy link
Member

mshima commented May 14, 2020

yeoman-generator dependency on yeoman-environment is optional due to backward compatibility for standalone generators, earlier versions of yeoman-generator had a hard dependency on yeoman-generator.
Don't make sense to install environment on every generator if yo already depends on it and forwards the instance of the environment to every generator.
Should be removed for 5.x.

NPM can be run with
npm install --no-optional

npm doesn't complains about the cyclic dependency, at least current ones.

@mshima
Copy link
Member

mshima commented May 15, 2020

Closing, reverted the version bump

@mshima mshima closed this as completed May 15, 2020
@avizov
Copy link
Author

avizov commented May 16, 2020

with the revert, the issue was resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants