3

Am trying to install widgets and forms module via Composer. But for both i get the some error.

What can be problem?

Could not scan for classes inside "cms//tests/behat/"

$ composer require silverstripe/widgets
Using version ^1.2 for silverstripe/widgets
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing silverstripe/widgets (1.2.2)
    Downloading: 100%

Writing lock file Generating autoload files

Installation failed, reverting ./composer.json to its original content.


  [RuntimeException]   Could not scan for classes inside "cms//tests/behat/" which does not appear to be a file nor a folder


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
kenorb
  • 155,785
  • 88
  • 678
  • 743
Ivan
  • 5,139
  • 11
  • 53
  • 86
  • Possible duplicate of [How to fix Composer error: "could not scan for classes inside dir"?](https://stackoverflow.com/questions/20595801/how-to-fix-composer-error-could-not-scan-for-classes-inside-dir) – kenorb Mar 23 '18 at 16:54

1 Answers1

0

It looks like composer's autoloader is expecting to see a Behat directory structure which is not there. Look at this post a similar issue there for which the solution is to delete any pre-composer installed modules and re-run composer update. If this is your dev environment, you can also delete your "vendor" directory, and re-run composer update or composer install as necessary.

kenorb
  • 155,785
  • 88
  • 678
  • 743
theruss
  • 1,690
  • 1
  • 12
  • 18