Skip to content
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

Bug in twing@5.1.1 causing npm run larva to throw a fatal when viewing patterns #494

Open
jameswburke opened this issue Apr 5, 2022 · 0 comments

Comments

@jameswburke
Copy link
Contributor

jameswburke commented Apr 5, 2022

Summary

Twing, the JavaScript library used to parse Twig templates in the @penskemediacorp/twig-to-php-parser package was recently updated with a 5.1.1 version.

Steps to Reproduce

  1. From within any /assets/ directory for a Larva install, run npm install and npm run larva.
  2. Open localhost:3000
  3. Navigate to any module, component, or object in the navigation.
  4. Twing 5.1.1 will throw the following error,
Cannot render template! 

TwingErrorRuntime: An exception has been thrown during the rendering of a template ("Cannot read property 'toString' of undefined") in "/Users/[name]/vvv-local/www/[project]/public_html/wp-content/themes/[themeName]/assets/node_modules/@penskemediacorp/larva-patterns/base.html" at line 51.
  1. Run npm install twing@5.1.0 and run through the remaining steps again to confirm the regression.

Docs

Here's an issue filed in the Twing repo in Gitlab, https://gitlab.com/nightlycommit/twing/-/issues/521.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant