notifme / notifme-sdk

A Node.js library to send all kinds of transactional notifications.
https://notifme.github.io/www/
MIT License
1.94k stars 149 forks source link

How to run the project? #87

Closed rmi111 closed 6 months ago

rmi111 commented 2 years ago

Hello, I am having the following issue when I try to run the project after adding NotifmeSDK in my fresh new Node js project. TypeError: NotifmeSdk is not a constructor at index.mjs:3:20 at ModuleJob.run (node:internal/modules/esm/module_job:175:25) at async Loader.import (node:internal/modules/esm/loader:178:24) at async Object.loadESM (node:internal/process/esm_loader:68:5)

A step by step guideline would have been helpful.

AnirudhaGohokar commented 2 years ago

I guess you are not importing correctly. Should ideally look like this if you are not using import.

const NotifmeSdk = require('notifme-sdk').default;