When compiled by 'client: true' and call template then 'utils is not defined' occurred.
See original GitHub issueutils.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:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We have a couple of optimizations in the pipe. I’d like to batch stuff, so I figure a release sometime next week.
Pushed out in v2.5.6: https://github.com/mde/ejs/releases/tag/v2.5.6