Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why do I get this error – Compiled with problems: Module not found: Error: Can't resolve 'react-top-loading-bar' while installing top-loading-bar

I want a top loading bar on my page but I keep getting a bunch of errors when I tried to install the npm.
this is the command I used-

npm install --save react-top-loading-bar
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>

and the errors in my terminal-

picture of the terminal

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

and the error on my browser

picture of the browser

>Solution :

These are upstream dependency issues from the package you’re trying to fetch while your project has a different version of react.

I get these a lot too with older packages now while working in react 18 projects.

You can install with a force:

npm install --save react-top-loading-bar -f
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading