-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marko Taglib: Cannot read property 'replace' of undefined #1726
Comments
I am having the same issue. When updating to Marko 5 I get the console warning message: After making that change and loading a page I get the error: |
@JPritchard9518 @hedav85 it turns out that You can opt into adding that meta data again by using: require("@marko/compiler/register")({ meta: true }) I do think we should figure out a better way to do this in |
@DylanPiercey with the meta flag it works 👍 So the issue is solved for me. |
Marko Version: 5.14.2
Details
If I render a marko template I got the error below from marko taglib
I use
require('@marko/compiler/register');
to load marko template and then I require the template viaconst template = require(templatePath).default;
And then I do
res.marko(template, {...}
to render and send it to the client.Your Environment
NodeJS 16.6.1
"@lasso/marko-taglib": "^2.0.3",
"@marko/express": "^1.0.0",
"lasso": "^3.4.0",
"lasso-less": "^4.0.0",
"lasso-marko": "^3.0.1",
"lasso-minify": "1.0.4",
"lasso-minify-css": "1.1.4",
"marko": "^5.14.2",
Is there something missing or I'm doing something wrong?
In Marko 4 it works fine. Could it depent on the change from
node-require
to@marko/compiler/register
?The text was updated successfully, but these errors were encountered: