Open rwjblue opened 8 years ago
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
@rwjblue :+1: Great idea!
@stefanpenner ember fix-dependencies
should just run npm install
for npm and for bower it should remove and install?
@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.
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.
I'm basically proposing adding a
ember fix-dependencies
command that does essentially the following:rimraf('node_modules/<package-name>');
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...