# Index.js import error

**URL:** <https://discourse.sst.dev/t/index-js-import-error/1206>\
**Category:** General\
**Created:** [August 8, 2019, 6:31am UTC](https://discourse.sst.dev/t/index-js-import-error/1206 "2019-08-08T06:31:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravnarayan](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@ravnarayan](https://discourse.sst.dev/u/ravnarayan)\
**Post date:** [August 8, 2019, 6:31am UTC](https://discourse.sst.dev/t/index-js-import-error/1206/1 "2019-08-08T06:31:29Z")

</div>

Hello, I am following this link:[https://serverless-stack.com/chapters/handle-routes-with-react-router.html](http://link), But once i delete `rm src/logo.svg` and add below to my index.js:

> ReactDOM.render(
> 
> > ```
> > <Router>
> > <App />
> > </Router>,
> > document.getElementById("root")
> > );
> > 
> > ```

in my `src/index.js` i get errors when i add `import App from "./App";`, please see below errors:

`Error 01`

> ./src/index.js  
> Line 10: ‘App’ is not defined react/jsx-no-undef
> 
> Search for the keywords to learn more about each error.

Error 2

> ./src/index.js
> 
> ```auto
> Attempted import error: 'App' is not exported from './App'.
> 
> ```

If anyone can please advise where i am going wrong, thank you?

Thank you,

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [August 9, 2019, 8:40pm UTC](https://discourse.sst.dev/t/index-js-import-error/1206/2 "2019-08-09T20:40:40Z")

</div>

The error is basically saying that `App` wasn’t exported in your `App.js`. What does that file look like?

---

<div class="post-metadata">

**Author:** ![ravnarayan](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@ravnarayan](https://discourse.sst.dev/u/ravnarayan)\
**Post date:** [August 10, 2019, 12:54am UTC](https://discourse.sst.dev/t/index-js-import-error/1206/3 "2019-08-10T00:54:16Z")

</div>

Hello @jayair,

Seems like i past that, and now I am stuck with this error:

````
Failed to compile

```
./node_modules/react-bootstrap/es/AccordionContext.jsError: ENOENT: no such file or directory, open '/home/ec2-user/environment/react/node_modules/react-bootstrap/es/AccordionContext.js'
```

This error occurred during the build time and cannot be dismissed.

````

Seems like we are missing AccordionContext.js, if so how do i get this?

Thank you Jay

---

<div class="post-metadata">

**Author:** ![ravnarayan](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@ravnarayan](https://discourse.sst.dev/u/ravnarayan)\
**Post date:** [August 10, 2019, 2:02am UTC](https://discourse.sst.dev/t/index-js-import-error/1206/4 "2019-08-10T02:02:54Z")

</div>

got it working,

`npm cache clean --force`

Please see github issue [Link](https://github.com/react-bootstrap/react-bootstrap/issues/3712#issuecomment-487282755)

Thank you,
