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.

When compiled by 'client: true' and call template then 'utils is not defined' occurred.

See original GitHub issue

utils.escapeXML => escape ?

function anonymous(locals, escape, include, rethrow
/**/) {
rethrow = rethrow || function rethrow(err, str, flnm, lineno){
  var lines = str.split('\n');
  var start = Math.max(lineno - 3, 0);
  var end = Math.min(lines.length, lineno + 3);
  var filename = utils.escapeXML(flnm);
  // Error context
  var context = lines.slice(start, end).map(function (line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');

  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;

  throw err;
};

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mdecommented, Jan 25, 2017

We have a couple of optimizations in the pipe. I’d like to batch stuff, so I figure a release sometime next week.

0reactions
mdecommented, Feb 25, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve "window is not defined" errors in React and Next.js
A different solution is to load your Scroll component using dynamic imports and the srr: false option.
Read more >
Webpack 5 - Uncaught ReferenceError: process is not defined
In webpack 5 automatic node.js polyfills are removed. In the migration docs it is mention that. Try to use frontend-compatible modules ...
Read more >
package.json is not defined by "exports" · Issue #444 - GitHub
Describe the bug './package.json' is not defined by "exports" when upgrading from v7.0.3 to v8.0.0 To Reproduce Steps to reproduce the ...
Read more >
How I solved and debugged my Webpack issue through trial ...
So I tried to set up the source maps as described in the docs by adding devtool. When webpack bundles your source code,...
Read more >
API — Jinja Documentation (3.0.x)
This document describes the API to Jinja and not the template language (for that, see Template Designer Documentation). It will be most useful...
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