Skip to content

False Positives for Missing Templates outside of pattern-lab #1116

Open
@joekarasek

Description

@joekarasek

I am using
"@pattern-lab/cli": "^0.0.3",
"@pattern-lab/core": "^3.0.5",
"@pattern-lab/engine-twig-php": "^3.0.6",
"@pattern-lab/starterkit-twig-demo": "^4.1.1",
"@pattern-lab/uikit-workshop": "^1.0.8",
on a linux docker container, on a mac (this behaviour occurs both in the container, as well as in OSX). Webpack is bundling my assets for me.

Expected Behavior

When I run a build of pattern-lab, it should only report a missing or broken reference if that twig template is actually missing.

Actual Behavior

For every twig file outside of the pattern-lab directory, I am getting an error along the following lines:

[watch:pl] Could not find pattern referenced with partial syntax components/breadcrumb/breadcrumb.twig.
[watch:pl]       This can occur when a pattern was renamed, moved, or no longer exists but it still referenced within a different template or within data as a link.

However, this file is present. Furthermore, the build does not fail and the patterns all render just fine.

Steps to Reproduce

Place a twig template outside of the pattern-lab directory. Add an appropriate namespace to reference to the config. Then reference that pattern from within pattern-lab. Run a build. It should report that file as missing, but still render its page in PL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions