-
Notifications
You must be signed in to change notification settings - Fork 22
Package Management
Project dependencies need to get updated from time to time. Here are some helpful tips if you're planning to take up this daunting task.
Upgrading the entire package.json to the latest versions in one go is not a good idea as it breaks a lot of things. A better approach is to do a slow roll-out. Update packages in chunks of ~5 at a time so that it is easier to localize the source of the error.
- Make sure you have the same versions of node/yarn as dev/test/prod
** Go to the openshift console, look for the project > terminal
** Run
node -v
,yarn -version
(alsonpm -version
in case you're using npm) to figure out the current version being used.
- Dependencies required by the application are referenced here
- Dependencies are installed in the
node_modules/
folder - Run
yarn install
to install all the dependencies - [Optional] Clean out
node_modules/
before runningyarn install
if you see errors
- csv-parse
- All grunt-* packages
- nodemailer
- multer
Upgrading these packages on local might not give you errors but fails when Jenkins triggers a build.
Exiting "Trigger OpenShift Build" unsuccessfully; build "mem-mmt-build-x" did not complete successfully within the configured timeout of "1200000" ms; last reported status: [Failed].
error: build error: non-zero (13) exit code from registry.access.redhat.com
Errors that look like this usually mean jenkins did not like some package(s), the details of which we never get to know. Therefore, do this.
- Dependencies required by the front-end are referenced here
- Dependencies are installed in the
public/lib/
folder - Run
bower install
to install all the dependencies - [Optional] Clean out
public/lib/
before runningbower install
if you see errors
- angular-mocks
- angular-cookies
- angular-bootstrap
- angular-ui-utils: 'bower' - don't change this.
- lodash - might break a lot of code.
You might have noticed the angular-sanitize errors on your chrome/firefox console. This can be fixed by making sure all angular-* versions point to 1.6.7. Doing that will kill the application (because of the packages listed above), and therefore, for now, we have to live with it.