'Dependency error while creating a Strapi app

While creating a Strapi app using NPM or Yarn I get the following error:
PS: My node and NPM versions are 14.19.1 and 6.14.16 respectively

npx: installed 103 in 10.123s
Creating a quickstart project.
Creating a new Strapi application at /home/user/projects/backend-app.
Creating files.
Error while installing dependencies:

 Keep trying!

Oh, it seems that you encountered errors while installing dependencies in your project.
Don't give up, your project was created correctly.
Fix the issues mentioned in the installation errors and try to run the following command:

cd /home/user/projects/backend-app && yarn install


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source