Closed dohomi closed 8 years ago
I dont really know anything about typescript, but I would guess it has trouble dealing with the Promise class, which is global. If you have any configuration file where you can declare global variables, you can add Promise.
I just figured out, that its not about the Promise but about the Fat Arrow
function which my Typescript compiler seems to have trouble with. But I'm not sure about it. Is there a minimum version of NodeJs for this package? Because due to Meteor restriction I still run a very old 0.10.x version
Well you should at least use Node 4 or 5 I guess, 0.10 is getting pretty old now that Node 6 is out..
Any way to update with Meteor ?
Nope, there isn't much Meteor
users can do about it. But they work on Node 4 and 6 integration. For the meantime I will use the Api 1.1.0 of this package which works so far quite well.
Or maybe you can use babel to compile the package (?)
Or you can use babel-register
:
node-mailjet.js
:
require('babel-register')
module.exports = require('node-mailjet')
I don't know how typescript would behave with this
Hey what's up with this ?
Hi @GuillaumeBadi as I'm running TypeScript with Meteor all the suggestions would not work in my usecase. As its very specific it has actually nothing to do with your API, I will close it. Beside that I am not using mailjet anymore because some important features were missing which I realised too late. Thanks for your quick response
Hey @dohomi ! What kind of features was missing from the API / Mailjet ?
Nothing is missing from the API. But I want to move all my email sendouts away from my servers to scheduled remarketing campaigns and Mailjet doesnt have this feature at all.. So I had to take a different service.
You might have a look at this : http://dev.mailjet.com/guides/#send-marketing-campaigns
Hello, I use node-mailjet with Typescript. After the release with Promise I receive an error and my builds fails constantly without any success of fixing it:
The code hangs at mailjet-client.js in line 172. Could you explain what to do making this package work with typescript?
Thanks