Skip to main content

Troubleshooting

  1. dsbridge package not recognized :

    1. Framework is Node.js powered
      1. Delete node modules
      2. Install node modules and synapse-js-sdk again
    2. Framework is ES6 JS
      1. Follow ES6 JS integration doc
  2. If Merchant uses Next.js and is getting the following error

 Uncaught ReferenceError: window is not defined

This is because, synapse-js-sdk is a client side library and it is trying to be rendered at server end.

  • One way to resolve this, use next/dynamic along with useEffect lifecycle hook, if this doesn't work, you can use
  • Only useEffect to initialise synapse. The following code demonstrates the same (This is written in JS, if the PWA also uses JS, please mention the methods and constructors explicitly because Intellisense sometimes does not work as expected)