-
Notifications
You must be signed in to change notification settings - Fork 21
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' #78
Comments
At what point does this error get thrown? |
@dudusotero // next.config.js const withTM = require("next-transpile-modules")([
"@pusher/push-notifications-web",
]); // pass the modules you would like to see transpiled
module.exports = withTM(); |
I'm having the exact same issue in React:
The strange thing is that I have other packages that use ES6 and they work just fine. Edit: Just adding that this error happens when I do |
same problem here |
Does this resolve your issue? Or perhaps the resolution at #78 (comment)? |
@benw-pusher #78 (comment) completely resolves this issue for anyone who uses NextJS (as the user who posted this issue does). I believe you can close this issue. |
I'm experiencing the same issue with svelte kit. This is also the only library that I'm having issues with. |
Adding this to the kit: {
vite: {
ssr: {
noExternal: ['@pusher/push-notifications-web'],
},
// ... |
I just stumbled upon this issue. The problem seems to be that the This is a not a problem with some users' configurations. So this should not be fixed in the users's configurations. I recommend to add How I fixed it: Add |
Using |
This is still an open issue for SvelteKit |
For anyone still running across this using Next.js, |
When I try to import the SDK into my application this error occurs
I'm using
import { Client } from "@pusher/push-notifications-web";
andimport * as PusherNotifications from "@pusher/push-notifications-web";
Should I downgrade the web SDK version?
The text was updated successfully, but these errors were encountered: