DEV Community

SyntaxError: import declarations may only appear at top level of a module

adamhercull on April 05, 2019

Hi guys, Im working on a tutorial project to skll my way up in ReactJS. Im stuck with an error related to webpack and babel that says "SyntaxErro...
Collapse
 
rhymes profile image
rhymes

Can you show your .babelrc?

Collapse
 
laurieontech profile image
Laurie

That error looks like it might be talking about an import statement in one of your javascript files? What pointed you towards babel/webpack as the error source?

Collapse
 
andy profile image
Andy Zhao (he/him)

It'd be great if you could push up your code to GitHub or some public repo for us to check out. :)