luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
812 stars 207 forks source link

Page Crawler cannot be installed via Composer #812

Closed jepster closed 8 years ago

jepster commented 8 years ago

I have the currently Luya kickstarter installed. As from the tutorial at https://luya.io/en/guide described by the following command.

composer create-project zephir/luya-kickstarter:1.0.0-beta5

I wanted to install the crawler

"zephir/luya-module-crawler" : "dev-master"

But then I'm getting a composer error:

Problem 1

  • The requested package luyadev/luya-core could not be found in any version, there may be a typo in the package name. Problem 2
  • Installation request for zephir/luya-module-crawler dev-master -> satisfiable by zephir/luya-module-crawler[dev-master].
  • zephir/luya-module-crawler dev-master requires luyadev/luya-core dev-master as 1.0.0-beta5 -> no matching package found.

Potential causes:

nadar commented 8 years ago

This is very common issue with composer, you could either change the stability flag to dev or "fake" a version if you want to access the beta5 version:

"zephir/luya-module-crawler" : "dev-master as 1.0.0-beta5"

In the documentation it should be written as 1.0.0-beta5 and not dev-master so its a mistake. Thanks for reporting.

jepster commented 8 years ago

I'm glad that I could point on a bug and help. :)

In the composer.json file is also the following entry

"luyadev/luya-core" : "1.0.0-beta5"

At a

composer update

I'm getting

Problem 1

  • The requested package luyadev/luya-core could not be found in any version, there may be a typo in the package name.

Is that an additional bug? If I remove that line, composer finishes the update.

jepster commented 8 years ago

After I've executed

./vendor/bin/luya command crawler crawl

I've got an exception:

Exception 'yii\db\Exception' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'luya.crawler_builder_index' doesn't exist The SQL being executed was: TRUNCATE TABLE crawler_builder_index'

in /Users/jepster/Sites/my-site/vendor/yiisoft/yii2/db/Schema.php:628

Error Info: Array ( [0] => 42S02 [1] => 1146 [2] => Table 'luya.crawler_builder_index' doesn't exist )

Shouldn't there has been any migration applied to the database?

nadar commented 8 years ago

Yes, just run: ./vendor/bin/luya migrate this is an advantage of LUYA, it finds all migrations in the modules and executes them all (after asking). I have added this to the installation guide.