Over the course of this sprint, I have started to understand more about various aspects of software development that don’t necessarily include coding. Between getting to know the other members of my team and troubleshooting the errors upon errors that I encountered while setting up my development environment, there was plenty to learn about and work on each day. These skills are definitely applicable to countless other scenarios – for example, troubleshooting is necessary on a daily, if not hourly, basis. If I had a chance to go back and redo this sprint, I would probably have distributed my time more evenly for the task that took the longest to complete (troubleshooting the provided Angular project so that it built and ran successfully), rather than working on it somewhat irregularly, which was during working class sessions and occasionally outside of class.
For the past couple of weeks that made up the sprint, we have been spending time completing various set-up tasks related to the user stories given during our sprint planning session. Our team is collaborating with AMPATH (more information about their organization here), working with their medical record software. The tasks completed this week included cloning their “ng2-amrs” project repository onto our own local machines, successfully running the project, and downloading any additional programs to prepare for writing and testing code. Using a Trello board, we organized these tasks (and will continue to do so throughout the semester) into “Doing” and “Done” columns, with the user stories either staying in the overall Product Backlog or the latest Sprint Backlog if we wanted to get those completed during this sprint.
In order to clone the project, we first created a GitHub organization, adding each team member to the group. Then, one of us forked the project from the AMPATH repository to our organization repository. Finally, each team member cloned the project to our computers. None of us had any issues with this task. When we were downloading other programs that may come in handy later (like a TypeScript IDE, as well as Insomnia for work with REST APIs), there didn’t seem to be any issue with this either.
The vast majority of problems arose when it was time to build and run the ng2-amrs Angular project. When I initially ran the build command (“ng build –prod”), a bunch of errors popped up, preventing compilation and building of the project. Fortunately, several classmates have been posting discussions and solutions to many of these errors on our Slack channel, and these were so helpful when I was trying to troubleshoot my project. These discussions combined with frantic Google searches got me through this process of fixing my project.
One of the errors had to do with inadequate memory allocation when running the build. This was solved using the commands presented in Reference #1, which adjusted the memory used to extend its limit. Another error had to do with a package (“ngx-openmrs-formentry”) used in some of the many TypeScript files not being imported or recognized properly in the program. I spent a lot of time trying to fix this issue, even going so far as to re-clone the project twice to no avail. Finally, once I realized that the error messages were coming from the same reappearing package present in the files, I simply reinstalled that package (with the installation command in Reference #2), and that fixed the problem. A third error that I encountered involved the Angular Dev-Kit not being recognized when attempting to run the build. Using the command from Reference #3, this issue was easily resolved.
As of yesterday, using the command “npm start,” I FINALLY got the project to run! This was great timing, as it is now the end of the first sprint and the beginning of the second. I’m looking forward to the upcoming sprint, especially once our team is all up and running!
References
- https://stackoverflow.com/questions/50621043/fatal-error-call-and-retry-last-allocation-failed-javascript-heap-out-of-memo – used to fix the memory allocation error
- https://npm.taobao.org/package/ngx-openmrs-formentry – installed to ensure that the specified “ngx-openmrs-formentry” package is being imported properly
- https://www.npmjs.com/package/@angular-devkit/build-angular – installed to have the Angular Dev-Kit on my local computer to build the project
From the blog CS@Worcester – Hi, I'm Kat. by Kat Law and used with permission of the author. All other rights reserved by the author.