-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
v3.1.1 version is raising Module parse failed: Unexpected token in index.mjs #29
Comments
Hi, thanks for reporting the issue. I can see the error is thrown because of the Nullish coalescing operator (??) characters in the dist file. According to Node.green, it has been supported since at least Node.js v14.5.0 Can you double-check the Node.js version that you're using when the build is running? |
I'm using Node v16.14.0.. Please check PaulLeCam/react-leaflet#883 for a similar issue (i'm using webpack 4.46.0) |
Thanks for the link. I'll take a look at releasing a version without nullish coalescing. |
Hey Marco, v3.1.2 should now not contain any nullish coalescing operators. |
Thanks! |
I've added this component via npm and when i compile my code I get this exception when using v3.1.1 of this component. It does work correctly with version 2.2.0
ERROR in ./node_modules/stale-while-revalidate-cache/dist/index.mjs 516:41
Module parse failed: Unexpected token (516:41)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See Concepts | webpack
Node v16
Typescript 4.5
The text was updated successfully, but these errors were encountered: