flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.34k stars 834 forks source link

ReflectionException - Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist #953

Closed AlexanderOMara closed 8 years ago

AlexanderOMara commented 8 years ago

So I tried to do a clean install of Flarum beta 5 today, but I was greeted with a big red error.

$ composer create-project flarum/flarum . --stability=beta
Installing flarum/flarum (v0.1.0-beta.5)
  - Installing flarum/flarum (v0.1.0-beta.5)
    Loading from cache

Created project in .

  [ReflectionException]
  Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist

  [ErrorException]
  Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::whatProvides() should be compatible
  with Composer\Repository\ComposerRepository::whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypassF
  ilters = false)

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

Installation appears to have failed part way, with no vendor folder being created. Apparently this is caused by a recent change to one of the dependencies.

dsevillamartin commented 8 years ago

That seems like an error with composer itself. See: Fxp**Composer**\AssetPlugin\Repository\NpmRepository does not exist

AlexanderOMara commented 8 years ago

@datitisev Looks like you might be right.

* goes to update Composer *

dsevillamartin commented 8 years ago

Actually, there is a package called Fxp which is used to install bower @ NPM dependencies via composer (I think that's what it does) That package is the problem, and it looks like it can't find a class. Weird.

franzliedke commented 8 years ago

Indeed. Please update that package (installed globally?) or run Composer with the no-plugins flag...

AlexanderOMara commented 8 years ago

Updating Composer itself didn't resolve the issue, but deleting the plugin did the trick.

rm -rf ~/.composer/vendor/fxp

Not sure exactly how this stuff changed since they were last working, but thanks for the help! I just assumed it must have been a Flarum issue.