boostercloud / booster

Booster Framework
https://www.boosterframework.com
Apache License 2.0
419 stars 87 forks source link

...Please upgrade your project Booster dependencies. #733

Open tainguyenbui opened 3 years ago

tainguyenbui commented 3 years ago

Documentation bug, improvement

Improvement

Description

After upgrading the Booster cli version to the latest available, @boostercloud/cli/0.12.3 darwin-x64 node-v13.14.0 I faced the following issue:

Error: CLI version 0.12.3 is higher than your project Booster version 0.11.5 in the 'feature' section. Please upgrade your project Booster dependencies.

Since I'm familiarized with JS projects, I knew I had to run npm upgrade in my project; however, new comers and especially new to JS/TS, they might be a bit lost on how to upgrade Booster dependencies. Would it help if npm upgrade or yarn upgrade was added to the error message?

In addition to the above, after I run npm upgrade I thought everything was ready to go; however, I faced the next issue:

Error: CLI version 0.12.3 is higher than your project Booster version 0.11.5 in the 'feature' section. Please upgrade your project Booster dependencies.

Yes, you are right, the exact same error. It turns out that two of my Booster dependencies, located in the package.json file weren't upgraded:

"@boostercloud/framework-core": "^0.11.5",
"@boostercloud/framework-types": "^0.11.5",

The fix was easy, I just had to manually change those versions to the following:

"@boostercloud/framework-core": "^0.12.3",
"@boostercloud/framework-types": "^0.12.3",

and then run npm install

I'm unsure about the reason why:

"@boostercloud/framework-provider-aws": "^0.12.3" and "@boostercloud/framework-provider-aws-infrastructure": "^0.12.3" where upgraded successfully and the other two mentioned above weren't, but there is definitely some friction especially for those not familiarized with dependencies in JS/TS projects.

I have to say that after fixing these couple of things, the project deployed successfully and it works amazingly well 🚀

NickSeagull commented 3 years ago

Yes, this is something icky sometimes. What I usually do is run npx npm-check-upgrades -u to update all of my deps at once. But this is not automatic for when you want to freeze into a Booster version. Would be nice to have this done automatic, or at least instruct the user through suggestions.