jedwatson / node-premailer Goto Github PK
View Code? Open in Web Editor NEWNode.js wrapper for premailer.dialect.ca
License: MIT License
Node.js wrapper for premailer.dialect.ca
License: MIT License
We have been getting the following error multiple times today, starting a few hours ago. These appeared even though we didn't make any changes to our mailer system at all.
Premailer returned an unkown server error
Thanks
When I have more than 10 files I get this error:
(node) warning: possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit.
I found a work around. I just created a grunt jub for every file but It might be good to have the normal behavior.
If the project is still maintained I might have the time to make a pull request
I don't know what to do against this issue. It seems like I MOST OF THE TIMES get a broken JSON from node-premailer? I am always using the same parameters including URL, but most of the times I get the error message and 1 out of 5 times, the result variable contains the result. Does anybody else have this problem?
This is how I execute it:
premailer.prepare({ html: resBody }, function (err, result){
console.log(results) //undefined
})
And this is the error I get:
SyntaxError: Unexpected token I in JSON at position 0
at JSON.parse ()
at Request.handlePremailerResponse [as _callback] (/home/pi/newsfire/node_modules/premailer-api/premailer.js:103:23)
at Request.self.callback (/home/pi/newsfire/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/home/pi/newsfire/node_modules/request/request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (/home/pi/newsfire/node_modules/request/request.js:1001:12)
at Object.onceWrapper (events.js:290:19)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
drin
/home/pi/newsfire/lib/newsfire.js:114
html: result.html // html body
^TypeError: Cannot read property 'html' of undefined
at model.Query.PageLog.find.sort.limit.find (/home/pi/newsfire/lib/newsfire.js:114:29)
at /home/pi/newsfire/node_modules/kareem/index.js:264:21
at /home/pi/newsfire/node_modules/kareem/index.js:127:16
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.