10 months ago
i use php 8.1 and
"mongodb/laravel-mongodb": "4.2",
"mongodb/mongodb": "^1.17".
when i deploy a get error message like this, Can someone help me
> @php artisan package:discover --ansi
Jul 10 20:13:35
#13 5.594
Jul 10 20:13:35
#13 5.594 Error
Jul 10 20:13:35
#13 5.594
Jul 10 20:13:35
#13 5.594 Class "MongoDB\Driver\Manager" not found
Jul 10 20:13:35
#13 5.594
Jul 10 20:13:35
#13 5.594 at vendor/mongodb/mongodb/src/Client.php:117
#13 5.594 113▕ $this->typeMap = $driverOptions['typeMap'];
Jul 10 20:13:35
#13 5.594 114▕
#13 5.594 115▕ unset($driverOptions['typeMap']);
Jul 10 20:13:35
#13 5.594 116▕
Jul 10 20:13:35
#13 5.594 ➜ 117▕ $this->manager = new Manager($uri, $uriOptions, $driverOptions);
Jul 10 20:13:35
#13 5.594 118▕ $this->readConcern = $this->manager->getReadConcern();
Jul 10 20:13:35
#13 5.594 119▕ $this->readPreference = $this->manager->getReadPreference();
Jul 10 20:13:35
#13 5.594 120▕ $this->writeConcern = $this->manager->getWriteConcern();
Jul 10 20:13:35
#13 5.594 121▕ }
Jul 10 20:13:35
#13 5.660
Jul 10 20:13:35
#13 5.660 +16 vendor frames
Jul 10 20:13:35
#13 5.660
Jul 10 20:13:35
#13 5.660 17 app/Providers/AppServiceProvider.php:17
Jul 10 20:13:35
Jul 10 20:13:35
#13 5.660 Illuminate\Support\Facades\Facade::__callStatic("defaultStringLength")
Jul 10 20:13:35
#13 5.660 +7 vendor frames
Jul 10 20:13:35
#13 5.660
Jul 10 20:13:35
#13 5.660 25 artisan:37
Jul 10 20:13:35
#13 5.660 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Jul 10 20:13:35
#13 5.660
Jul 10 20:13:35
#13 5.666 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Jul 10 20:13:35
#13 ERROR: process "/bin/bash -ol pipefail -c composer install --ignore-platform-reqs" did not complete successfully: exit code: 1
Jul 10 20:13:35
Jul 10 20:13:35
-----
Jul 10 20:13:35
> [ 8/12] RUN composer install --ignore-platform-reqs:
Jul 10 20:13:35
5.660 +16 vendor frames
Jul 10 20:13:35
5.660
Jul 10 20:13:35
5.660 17 app/Providers/AppServiceProvider.php:17
Jul 10 20:13:35
5.660 Illuminate\Support\Facades\Facade::__callStatic("defaultStringLength")
Jul 10 20:13:35
5.660 +7 vendor frames
Jul 10 20:13:35
5.660
Jul 10 20:13:35
5.660 25 artisan:37
Jul 10 20:13:35
5.660 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Jul 10 20:13:35
5.660
Jul 10 20:13:35
5.666 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Jul 10 20:13:35
-----
Jul 10 20:13:35
Jul 10 20:13:35
Dockerfile:20
Jul 10 20:13:35
-------------------
Jul 10 20:13:35
18 | COPY . /app/.
Jul 10 20:13:35
19 | RUN mkdir -p /var/log/nginx && mkdir -p /var/cache/nginx
Jul 10 20:13:35
20 | >>> RUN composer install --ignore-platform-reqs
Jul 10 20:13:35
21 | RUN npm ci
Jul 10 20:13:35
22 |
Jul 10 20:13:35
-------------------
Jul 10 20:13:35
ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install --ignore-platform-reqs" did not complete successfully: exit code: 1
Jul 10 20:13:35
Jul 10 20:13:35
Error: Docker build failed
0 Replies