Getting an error as Cannot use import statement outside a module in react js

Hello Experts,

I am trying to use @atlaskit/select in the hello-world.hbs file for that I have added the react code from single-select in the my-app.js file and added a line in hello-world.hbs file so that the script will execute. But I am getting an error in browser console as Uncaught SyntaxError: Cannot use import statement outside a module
Does anybody know how to deal with this?

Thanks
Vedant

i got the same weird issue and fixed it. I was unable to get a proper answer so i have written a post explaining the issue and possible solutions for cannot use import issue