Installation using Composer break Kirby
DominiqueVial opened this issue · 3 comments
So I wanted to install this plugin using Composer. First, you have to know I am new to Composer.
So I run the given command on website's directory:
composer require omz13/kirby3-xmlsitemap
Every seems fine:
composer require omz13/kirby3-xmlsitemap
Using version ^1.2 for omz13/kirby3-xmlsitemap
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing getkirby/composer-installer (1.1.4): Loading from cache
- Installing omz13/kirby3-xmlsitemap (1.2.1): Loading from cache
Writing lock file
Generating autoload files
But now Kirby is broken:
Fatal error: Uncaught Error: Class 'Kirby' not found in index.php:5 Stack trace: #0 {main}
thrown in index.php on line 5
It looks like you are trying to create a new composer project for just this plugin. What you need to do is create a composer project for your website based on getkirby/starterkit
or getkirby/plainkit
, and then add this plugin as a dependency. Kindly see Kirby meets Composer for details. I would suggest you start with starerkit so you have some default content to play with.
Ok, I'll have a look into this. Thank you for your quick answer.
I follow instructions on Kirby's and now it works fine. Thank you very much!