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: Cannot use import statement outside a module #6

Open
hokagedemehin opened this issue Mar 18, 2022 · 2 comments
Open

SyntaxError: Cannot use import statement outside a module #6

hokagedemehin opened this issue Mar 18, 2022 · 2 comments
Assignees

Comments

@hokagedemehin
Copy link

Hello,

After installing the official tawk react package, I get this error SyntaxError: Cannot use import statement outside a module. please could you assist in resolving it?

File name where error occurs
file:///C:/Users/user/project/nextjs-project/node_modules/%20(tawk.to/tawk-messenger-react/src/index.js

  • OS - windows
  • Framework - Next.js
@shahidcodes
Copy link

Same

@max-degterev
Copy link

max-degterev commented Apr 6, 2022

This is just a very thin wrapper over a loader. It's best to use something like React Script or https://nextjs.org/docs/basic-features/script instead

If it was a full reimplementation avoiding loading the script from tawk.to cdn that would another matter.

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

4 participants