question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.5.8 regression - untransformed output with expressjs

See original GitHub issue

@mde I just upgraded from 2.5.7 to 2.5.8 and I’m not using readfile synchronously - just through expressjs. Although this looks similar to #355 I am not directly invoking any ejs functions.

I’m still seeing the template not getting filled out. given a template of <title><|= locals.foo |></title> I get <title>bar</title> in 2.5.7 and <title><|= locals.foo |></title> in 2.5.8 (untransformed output)

  .get('/test', function (req, res, next) {
    let tmplParams = {foo: 'bar'}
    let promise = new Promise((resolve, reject) => res.render(path.resolve('./index-test.ejs'), tmplParams, (err, html) => {
      if (err) {
        reject(err)
      } else {
        resolve({status: tmplParams.status, html})
      }
    }))
    promise.then(tmpl => send(res, tmpl))
  })

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
derduhercommented, Apr 19, 2018

verified! thanks!

0reactions
mdecommented, Apr 19, 2018

Fixed and pushed to NPM, v2.5.9.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rmWhitespace option not getting passed to ejs with express 4.x
I'm running ejs@2.5.8 with express@4.16.3. I tried setting the rmWhitespace ... 2.5.8 regression - untransformed output with expressjs #362.
Read more >
Performance Best Practices Using Express in Production
This article discusses performance and reliability best practices for Express applications deployed to production. This topic clearly falls into the ...
Read more >
Release Change Log - Express.js
1 patch release includes one bug fix: The change to the res.status() API has been reverted due to causing regressions in existing Express...
Read more >
API Reference - Express 4.x
Check out the query parser application setting documentation for other customization options. req.res. This property holds a reference to the response object ...
Read more >
5.x API - Express.js
This is a built-in middleware function in Express. It serves static files and is based on serve-static. NOTE: For best results, use a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found