1
votes

My app was working perfectly fine just before i installed simple-react-bootstrap After installing it is now showing blank page and in console it's showing error:

Uncaught SyntaxError: Unexpected token import

I have checked almost every solution on stackoverflow but it doesn't seems to work.

I have tried this:

npm install --save-dev babel-plugin-transform-es2015-modules-commonjs

This:

npm install babel-preset-es2015 babel-preset-react --save-dev

BABELRC file:

{
  "presets": ["react-app"]
}

And other similar solutions. Any help?

1
What is your .babelrc file? - Shubham Jain
please check edit. - Noman Ali
Try using ["es2015", "react"] in the presets. And let me know. if it worked - Shubham Jain
I have used "presets": ["es2015", "react", "react-app"] but no it's not working :( - Noman Ali
Did you tried removing the react preset and then running too? - Shubham Jain

1 Answers

1
votes

So, i have resolved this by removing react-simple-bootstrap module from my app. That was making issue. Incase.