Errors when running yarn start

Hi!

I am trying to run a dhis2 project, but when I run ‘yarn start’ it displays the following errors:

I have also recently seen someone else with the same issue. Any tips will be greatly appreciated!

Hi @Ingvild

Welcome to the community! Thank you for the post.

Does this error appear right after it says that it is available on port 3000, are you able to go to the localhost:3000 and see what the errors in the console and Network tabs say?

I can make some suggestions, but it’d help a lot more if we could get more information such as whether this is the default app or an app that you have modified?

Please try to remove the yarn.lock file, You could then use npm update -g -D, npm audit fix, npm install, and npm init -y

Would you like to test using a port other than 3000? you could add to the yarn start the --proxyPort 8184?

Thank you! Please update us and consider adding more info about the app.

Thank you for your reply!

There are not any errors in the console or in the network tabs. The network tab does not show anything regarding the project. This is a default app that I have not modified, and it should be able to run (my colleagues are able to run the same exact project). After I download the folder containing the project files, I run yarn install and then yarn start. I made projects using dhis2 last year, and did not have any of the same issues back then.

I tried to follow your recommendations. I removed the yarn.lock file and ran npm update -g -D, but it did not work. Whenever I run npm install in the project I get the following errors, and I have to exit the terminal:

I have a MacBook with an M1 chip, so I don’t know if it could have anything to do with compatibility with arm64 architecture.

Thank you in advance.

Hello again!

We finally figured out the issue. The newest version of yarn was not compatible with the dhis2-project, so by running ‘yarn set version 1.22.19’ in the terminal and then running ‘yarn install’ again the project was able to run.

1 Like

Thank you so much for sharing the solution! :slight_smile: