Closed HysMX closed 10 months ago
Had to rollback to 2.0.0 and it works now so something broke between 2.0.0 and 2.1.2
Huh, that's weird. Let me check if I can replicate the issue.
The only "big" change between 2.0.0 and 2.1.0 was the addition of "sideEffects": false
to the package.json, which might have broken the messages/index.ts imports accidentally.
Would you mind trying out this beta release?
npm i whatsapp-api-js@2.0.1-beta.0
That release is exactly the same as v2 except for the side effects property. If it breaks too, it's definitely the reason.
Working with 2.0.1-beta.0
Wow, ok, that's absolutely unexpected.
Let's keep scaling. 2.1.0 contains almost no code change, most of the files are documentation and CI/CD. The only ts files changed were index.ts, template.ts and types.ts, so I expect it to work too.
npm i whatsapp-api-js@2.1.0
Do you want to try out 2.1.3-beta.0? I removed the sideEffects property from package.json
2.1.3-beta.0 still says that
I will close this as solved. The issue was a mismatching package and tsconfig.
For future reference, I recommend using the library with "type": "module"
in package.json and "target": "es6"
, "module": "nodenext"
and "skipLibCheck": true
in tsconfig.json, specially since CJS support might be dropped in the future.
Describe the bug Can't create a text object to send a message, it returns Text is not a constructor
To Reproduce
creating the text inside the sendMessage function doesn't work either, it was like that
Expected behavior create the Text Object to be able to send the message
Version: 2.1.2
Even const txt = new Text('Hola', false); doesn' work