-
Notifications
You must be signed in to change notification settings - Fork 12
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 #12
Comments
Downgrading to version |
It would also be nice to not need React considering I was planning to use this for Vue and the README even mentions Vue specifically. |
Wouldn't be enough to switch |
I'm not sure but I would just switch it to only import the things which are actually needed. Might send a PR later if I remember to |
Hi,
there are already a few issues due to build problems however the error I'm getting is not among them.
After adding an import of the package to my next.js project (using TypeScript) I get the following error:
The mentioned (compiled) file does indeed contain the import:
![grafik](https://user-images.githubusercontent.com/18028031/210657635-c78e7056-2555-41d2-ba2d-bfbad46012d8.png)
This is the only import in this compiled file so I guess it is a build error and the other imports got adjusted properly.
Maybe this import could be adjusted to just import the used function/types/etc and not everything and that might resolve the issue:
json-diff-kit/src/viewer.tsx
Line 1 in 2b60edd
Also just in case this import exists because it was necessary to import React in older versions of React, this is no longer the case.
The text was updated successfully, but these errors were encountered: