Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Unexpected token 'export' #388

Open
TheHoltz opened this issue Mar 2, 2022 · 7 comments
Open

SyntaxError: Unexpected token 'export' #388

TheHoltz opened this issue Mar 2, 2022 · 7 comments

Comments

@TheHoltz
Copy link

TheHoltz commented Mar 2, 2022

I'm using node version v14.15.4 and NextJS 12.0.7, with react 17.0.2, and when I try to import anything, it gives me that error:

image

Did anyone manage to solve it?

@donnes
Copy link

donnes commented Mar 9, 2022

Same issue here

@miladezzat
Copy link

same issue

@miladezzat
Copy link

@EmaSuriano

@uyendo-tmrw-vn
Copy link

yep, me too,

@easylaneof
Copy link

easylaneof commented Apr 5, 2022

You need to use something like

//... next.config.js

const withTM = require('next-transpile-modules')(['react-scroll-section']);

module.exports = withTM(nextConfig);

If you don't use next.js, find a way how to transpile modules with your build system

@bogdancss
Copy link

any updates on this @EmaSuriano ?

@EmaSuriano
Copy link
Owner

Hello guys, I updated the library to use Vite to compile the project and the typing issue should be fixed.

Can you confirm this @bogdancss ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants