Open nmeirik opened 9 years ago
The problem appears to be in the check for the existence of the $tempDirDist
variable which in my case contains /tmp/pl-sk-archive/dist
while the actual starterkits are downloaded/unzipped into a folder structure where the name of the starterkit is included in the path, so the path should be something like /tmp/pl-sk-archive/starterkit-twig-base-master/dist
.
Which part is considered the bug? The inclusion of the starterkit name in the path, or the check not taking the starterkit part of the path into account?
I realize I'm following up on this really late but looks like I have a PR to fix this so I'll get that worked in so others can benefit from this. Sorry.
@dmolsen @aleksip Has this been fixed? I'm still getting this error when trying to install with composer. Is there a workaround?
I'm running this on Ubuntu 17.04
cd install/location/
composer create-project pattern-lab/edition-twig-standard your-project-name && cd $_
and I get this output with an error at the end
Installing pattern-lab/edition-twig-standard (v2.2.1)
- Installing pattern-lab/edition-twig-standard (v2.2.1): Loading from cache
Created project in your-project-name
> PatternLab\Installer::setProjectInstall
> PatternLab\Installer::getSuggestedStarterKits
> PatternLab\Installer::getConfigOverrides
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 16 installs, 0 updates, 0 removals
- Installing pattern-lab/styleguidekit-assets-default (v3.5.0): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing pattern-lab/styleguidekit-twig-default (v3.0.0): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing twig/twig (v1.35.0): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing symfony/yaml (v3.3.10): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing symfony/process (v3.3.10): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing symfony/finder (v3.3.10): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing symfony/filesystem (v3.3.10): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing symfony/event-dispatcher (v3.3.10): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing shudrum/array-finder (v1.1.0): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing seld/jsonlint (1.6.1): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing michelf/php-markdown (1.7.0): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing kevinlebrun/colors.php (1.0.2): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing doctrine/collections (v1.4.0): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing alchemy/zippy (0.3.5): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing pattern-lab/core (v2.8.10): Loading from cache
> PatternLab\Installer::postPackageInstall
- Installing pattern-lab/patternengine-twig (v2.1.3): Loading from cache
> PatternLab\Installer::postPackageInstall
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
alchemy/zippy suggests installing ext-zip (To use the ZipExtensionAdapter)
alchemy/zippy suggests installing guzzle/guzzle (To use the GuzzleTeleporter)
Writing lock file
Generating autoload files
> PatternLab\Installer::postUpdateCmd
suggested starterkits that work with this edition:
1: pattern-lab/starterkit-twig-base
2: pattern-lab/starterkit-twig-demo
choose an option or hit return to skip: (ex. 1) > 1
downloading the starterkit. this may take a few minutes...
finished downloading the starterkit...
failed to extract the starterkit. easiest solution is to manually download it and copy <path>./dist</path to ./source/...
I was able to resolve this issue on a debian machine by installing the bsdtar package.
@ shaal - I had the same problem on my windows-system. I skipped the starterkit. After that I cloned the starterkit directly from github. Then I copied the content of the '.dist' folder into the 'source' folder. After that I had to fix a bug in confing/config.yaml the path to the styleguide, I rememberd that mistake by using 'php core/console --config --list' .
I encountered the same issue on a CI image running Alpine linux. Installing bsdtar fixed the issue for me as well. For Alpine, the command was: sudo apk add libarchive-tools
on Ubuntu 18,
sudo apt install bsdtar
solved the problem!
Yeah, unfortunately pattern-lab/patternlab-php-core#121 was closed without actually merging or fixing the dependency so working around it is sort of the only solution ATM. Feels kinda unmaintained.
I ran into this issue too. In my case I'm running Docksal so I did this:
fin exec 'sudo apt-get update -y && sudo apt-get install bsdtar -y'
Then running npm start did not error out:
suggested starterkits that work with this edition:
1: pattern-lab/starterkit-twig-base
2: pattern-lab/starterkit-twig-demo
downloading the starterkit. this may take a few minutes...
finished downloading the starterkit...
installing the starterkit files...
starterkit files have been installed...
cleaning up the temp files...
the starterkit installation is complete...
Thank you for installing...
... based on this issue:
https://github.com/docksal/docksal/issues/710#issuecomment-406362741
My only issue remaining is that my Drupal emulsify theme (cloned to my own new theme) URL is wrong in terminal but sure enough, I can get to the Pattern Lab URL with mysite.docksal/[path-to-pattern-lab-public]
and it looks and works fine. I just don't know yet if browserSync will work at the manually typed url so I'll have to take a look at that all. but it's good to at least get this installed. I'm grateful I found this issue.
Steps to reproduce:
composer create-project pattern-lab/edition-twig-standard [project-name]
1
and hit Enter.The wizard attempts to download the starter kit, but exists with the error:
the starterkit needs to contain a dist/ directory before it can be installed...
As we plan to build our own StarterKit, we do not require the base nor the demo to function properly, but I do need to understand how they should be structured as the demo, according to the Github source, appears to contain a dist/ directory, contrary to what the error message says.