I am getting the below error after initializing pusher on nextjs application:
export { Client, RegistrationState, TokenProvider };
^^^^^^
SyntaxError: Unexpected token 'export'
I have also tried modifying the next.config.js file to the following:
const withTM = require("next-transpile-modules")(["@pusher/push-notifications-web"])
module.exports = withTM({
env: {
apiBaseUrl: "",
apiBaseUrlChat: ""
},
});
When I am trying to execute npm run dev
, it is giving me the following error:
TypeError: modules.map is not a function