Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Return value of AssetsBuilder::getInstallPath() must be of the type string, null returned #17

Open
kiironoaki opened this issue Oct 3, 2023 · 2 comments

Comments

@kiironoaki
Copy link

  • PHP version: 7.3.33-14+ubuntu20.04.1+deb.sury.org+1 (cli) (built: Sep 2 2023 08:02:05) ( NTS )
  • Composer version: 2.6.4 2023-09-29 10:54:46
  • Package version: v1.3.1
In AssetsBuilder.php line 135:

  [TypeError]
  Return value of TheCodingMachine\Discovery\AssetsBuilder::getInstallPath() must be of the type string, null returne
  d


Exception trace:
  at /home/[REDACTED]/vendor/thecodingmachine/discovery/src/AssetsBuilder.php:135
 TheCodingMachine\Discovery\AssetsBuilder->getInstallPath() at /home/[REDACTED]/vendor/thecodingmachine/discovery/src/AssetsBuilder.php:65
 TheCodingMachine\Discovery\AssetsBuilder->TheCodingMachine\Discovery\{closure}() at n/a:n/a
 array_filter() at /home/[REDACTED]/vendor/thecodingmachine/discovery/src/AssetsBuilder.php:68
 TheCodingMachine\Discovery\AssetsBuilder->findAssetTypes() at /home/[REDACTED]/vendor/thecodingmachine/discovery/src/Dumper.php:43
 TheCodingMachine\Discovery\Dumper->dumpDiscoveryFiles() at phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(277) : eval()'d code:56
 TheCodingMachine\Discovery\DiscoveryPlugin_composer_tmp0->beforeDumpAutoload() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:206
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:129
 Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:204
 Composer\Autoload\AutoloadGenerator->dump() at phar:///usr/local/bin/composer/src/Composer/Installer.php:361
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:490
 Composer\Command\RequireCommand->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:339
 Composer\Command\RequireCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:382
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:145
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:93
 require() at /usr/local/bin/composer:29
kiironoaki added a commit to kiironoaki/discovery that referenced this issue Oct 3, 2023
Package with type metapackage doesn't have installation path, which brings with it a problem finding discovery JSON files in all packages. Filter add for removing "metapackages" and leave only real

Refs: thecodingmachine#17

Refs: https://getcomposer.org/doc/04-schema.md#type
@mafftor
Copy link

mafftor commented Jul 11, 2024

up

@gustavoulyssea
Copy link

I am having the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants