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

Import error, can't find file – stackblitz React JS

I’m working on a POC on stackblitz environment, while trying to import the app.tsx file, Import error, can't find file: getting this error in browser.

Below is my project link

https://stackblitz.com/edit/react-ts-kvyax9

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

Please help.

>Solution :

You have lots of typos/spelling mistakes in your imports.

In index.tsx, you have this import:

import App from './App';

whereas your app file exists as app.tsx not as App.tsx. You need to mention the filename correctly as

import App from './app';

Similarly, in app.tsx, all your imports are referencing incorrect filenames. Change them to this:

import A from './a';
import B from './b';
import C from './c';
import D from './d';
import './style';
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