Open mortona42 opened 8 years ago
in vendor/pattern-lab/styleguidekit-twig-default, there is a views directory, and not much else.
@mortona42 -
Looks like a path is building incorrectly. I'll double-check that.
Any solution or workaround on this issue? I would love to use this great project with twig:)
I'm also getting this error intermittently whilst working with Twig. Any solutions?
I'm not having a lot of luck tracking down where that path is built, but a temporary workaround is to change the path in /config/config.yml.
For example, on a PC it's setting styleguideKitPath to a path like this:
styleguideKitPath: 'D:\project\pattern-lab\vendor/pattern-lab/styleguidekit-twig-default'
I believe the path should simply be relative to the pattern lab root folder, like this:
styleguideKitPath: 'vendor/pattern-lab/styleguidekit-twig-default'
That fixed the issue for me on PC. It doesn't appear to be an issue on other operating systems as it creates the relative path correctly.
@dmolsen Just ran into this again -- it's creating an absolute path with mixed slashes and backslashes on Windows. Only fix I've found so far is to manually edit the path and make it relative.
This comes from https://github.com/pattern-lab/patternlab-php/blob/b5769cc6673a91ce029d146e4aa169594af830ce/core/src/PatternLab/Installer.php#L53.
Also related to Installer::postPackageInstall,Installer::postPackageUpdate and Installer::prePackageUninstall where the code is used.
The code $event->getComposer()->getInstallationManager()->getInstallPath($package)
adds the full (absolute) path (on Windows) (in specific cases, it seems Composer uses the full path?) and this is still happening in core 2.7.0
.
Possibly related: https://github.com/pattern-lab/patternlab-php-core/commit/283010d061aa238cbe865691f0b1ee261ee5df01 and https://github.com/pattern-lab/patternlab-php-core/issues/38
Picking either of these options when I install gives me this error when I tried to generate:
configuring pattern lab... your styleguide won't render because i can't find your styleguide files. are you sure they're at .\C:\Users\Andrew\sites\sinceileftyou3\public\wp-content\themes\since ileftyou\pattern-lab\vendor/pattern-lab/styleguidekit-twig-default? you can fix this in ./config/config.yml by editing styleguideKitPath...