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

Add command to "fix" missing deps. #53

Open
rwjblue opened this issue Nov 15, 2015 · 4 comments
Open

Add command to "fix" missing deps. #53

rwjblue opened this issue Nov 15, 2015 · 4 comments

Comments

@rwjblue
Copy link
Collaborator

rwjblue commented Nov 15, 2015

I'm basically proposing adding a ember fix-dependencies command that does essentially the following:

  • For npm deps installed at the wrong versions: rimraf('node_modules/<package-name>');
  • For bower deps installed at the wrong versions: rimraf('bower_components/<package-name>');
  • npm install
  • bower install

This is essentially what we all have to do manually right now after seeing we have the wrong deps, it would be nice if the error that prints out today by the dep checker could include a reference to the command that would "fix" things...

@stefanpenner
Copy link
Collaborator

I'm basically proposing adding a ember fix-dependencies command that does essentially the following:

For npm deps installed at the wrong versions: rimraf('node_modules/');

npm v3 should already do this. v2 did not do this deeply, which caused most of the issues.
If a scenario exists, that demonstrates v3 unable to resolve this, a bug should be opened on npm

bower is pretty much just #yolo

@quaertym
Copy link
Owner

@rwjblue 👍 Great idea!
@stefanpenner ember fix-dependencies should just run npm install for npm and for bower it should remove and install?

@stefanpenner
Copy link
Collaborator

@stefanpenner ember fix-dependencies should just run npm install for npm and for bower it should remove and install?

interestingly, it could do the "right thing" based on which npm is used. We should warn and recommend people upgrade if pre 3x is discovered.

@rwjblue
Copy link
Collaborator Author

rwjblue commented Nov 16, 2015

npm v3 should already do this

Maybe (I really have no clue or experience, I still run on v2), but the specific list of things to do wasn't really the point of this issue.

The point is when ember-cli-dependency-checker prints a list of packages that are either missing or mismatched I would like it to also print a easily copy/pastable command that can be used to get things back into a valid state. If that means detect if we are using npm@2.x we do one set of commands and under npm@3.x we do something different then it makes the command even more valuable IMHO.

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

No branches or pull requests

3 participants