Skip to content

Developers Guide

Joel Davies edited this page Jul 15, 2024 · 7 revisions

OperationsGateway is built using Yarn v4.3.0.

As usual, when cloning the repo, or changing branches run:

yarn install

To ensure you install the required packages for that branch.

@babel/runtime dependency errors

Module not found

We have run into difficulties from the early days of OperationsGateway development where, occasionally, yarn is unable to find a specific dependency relating to @babel/runtime. The CI should not have these problems, this is usually a local issue. They may manifest similar to the below:

image

This can sometimes be fixed by deleting the node_modules folder as this essentially "clears the cache" of the old babel version which can be broken by babel versions changing.

If that doesn't work, the next best solution we've found is to re-clone the repository. Yarn has clearly run into some caching problems and a new repo will always work.

Cannot find [specific version]

We have also seen a similar error for @babel/runtime where the app seems to require a different version of the dependency than what is currently installed. You may get messages similar to the below:

image

This is an issue with the global Jest cache stored elsewhere on your computer. Run:

yarn test --clearCache

to clear the cache.

Clone this wiki locally