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

Patternlab engine-twig watcher doesn't build correctly #1310

Open
ray87 opened this issue Apr 12, 2021 · 3 comments
Open

Patternlab engine-twig watcher doesn't build correctly #1310

ray87 opened this issue Apr 12, 2021 · 3 comments

Comments

@ray87
Copy link

ray87 commented Apr 12, 2021

I am using Pattern Lab Node v5.14.2 on Windows / Mac / Dockerized, tested with Node v12.22, v14.x, v15.x, using a Gulp or Vanilla Edition.

Expected Behavior

After changing pattern, the watcher should build all components and create new rendered versions for UI. The process doesn't throw any errors or warning, everything seems to run as it should and refreshes the browser. The UI then should show updated patterns.

Actual Behavior

After browser updates, it still shows old rendered version, but updated twig-file. After running patternlab build from console and refreshing browser manually, it shows updated versions.

Steps to Reproduce

Install @pattern-lab/engine-twig@15.4.0, create an dummy pattern with just text in it. Run pl:serve, change pattern, check browser.

@SaroGFX
Copy link

SaroGFX commented Apr 15, 2021

I experience a similar issue with watchers

@hadl
Copy link
Contributor

hadl commented May 18, 2021

I am using the engine-twig-php and for me this happens too occasionally.

Think in this case it has something to do with @basalt/twig-renderer, but i am not 100% sure.
Thats why i am posting here.

Once there was an error message with cannot connect to server....

A few minutes ago it was "failing silently", everything looked good no errors etc. but the pattern did not get updated.
I checked lsof -i -P | grep -i "listen" and saw that there was a php process listening at port 53420. Killed that and now it is working again. All without restarting my watcher.

It would be great if someone can have a look at that issue. Its very time consuming especially if no errors happen.

Maybe @EvanLovely can say something about that?

@renestalder
Copy link
Contributor

A behaviour I can reproduce is, that it actually works when I make a change to the JSON file specific to the twig file I updated. So, I'm often forced to quickly save the JSON file (even though I didn't make a change or only added a space), this way I can work around the issue.

(Interesting enough, the change to the json file alone builds match faster in watch mode, seems incremental, while a change to a twig file seems to build everything from scratch, yet doesn't show the change in the UI).

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

No branches or pull requests

5 participants