Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

Backpack not found error #776

Closed backpack-operations closed 9 months ago

backpack-operations commented 10 months ago

Hello team,

I just received this on email:

"But I got an error when trying to install Backpack Pro on my PC.

like the one below. PS C:........\www\backpack-v6> composer require backpack/pro ./composer.json has been updated Running composer update backpack/pro Loading composer repositories with package information Updating dependencies Nothing to modify in lock file Installing dependencies from lock file (including require-dev) Package operations: 10 installs, 0 updates, 0 removals

karandatwani92 commented 10 months ago

Hey @backpack-operations

Please share your composer.json file to find out the issue and help.

Thanks

ada27 commented 10 months ago

Hi @karandatwani92

I think that is my case, and can you help me to solve that?

{ "name": "laravel/laravel", "type": "project", "description": "The skeleton application for the Laravel framework.", "keywords": ["laravel", "framework"], "license": "MIT", "require": { "php": "^8.1", "backpack/crud": "^6.3", "backpack/editable-columns": "", "backpack/permissionmanager": "", "backpack/pro": "", "backpack/theme-coreuiv4": "^1.1", "backpack/theme-tabler": "", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/sanctum": "^3.3", "laravel/tinker": "^2.8" }, "require-dev": { "backpack/devtools": "*", "backpack/generators": "^4.0", "fakerphp/faker": "^1.9.1", "laravel/pint": "^1.0", "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.0", "phpunit/phpunit": "^10.1", "spatie/laravel-ignition": "^2.0" }, "autoload": { "psr-4": { "App\": "app/", "Database\Factories\": "database/factories/", "Database\Seeders\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\Foundation\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" ], "post-install-cmd": ["php artisan storage:link --quiet"] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, "php-http/discovery": true } }, "minimum-stability": "stable", "prefer-stable": true, "repositories": [ { "type": "composer", "url": "https://repo.backpackforlaravel.com/" } ] }

karandatwani92 commented 10 months ago
"backpack/crud": "^6.4",
"backpack/editable-columns": "^3.0",
"backpack/permissionmanager": "^7.0",
"backpack/pro": "^2.0",
"backpack/theme-coreuiv4": "^1.1",
"backpack/theme-tabler": "^1.0",

I used your composer.json with the above. It Worked!

Either, you can try Quick Installation. https://github.com/Laravel-Backpack/PRO#installation

ada27 commented 10 months ago

Hi @karandatwani92,

I can't access that link, as you mentioned. image

I tried again, but I got an error like the picture below. Screenshot 2023-12-06 083946

I already bought a backpack everything, but I read on the log that I couldn't find any repositories.

karandatwani92 commented 10 months ago

Try this https://backpackforlaravel.com/user/tokens

Go to the instructions tab, and follow the instructions.

pxpm commented 10 months ago

@ada27 also try to clear composer caches with: composer clear-cache and make sure you are not overwriting the default composer behavior, because it seems that's trying to get the backpack/pro from the github repository, when it should be getting it from the private repo (as you don't have access the the github repository).

Also I noticed from the composer.json you posted that you have some packages without specified version(like backpack/pro: ""). @karandatwani92 provided a list of compatible version numbers, so you can fill up those missing package versions and try to install again. If you are still having issues let us know.

Cheers

ada27 commented 9 months ago

Thanks, @karandatwani92 and @pxpm, for your advice. I added the auth.json credential to my project, and I can access repositories clearly.

Can I delete auth.json and backpack license on env before I deploy a project on the client server? because my credentials clearly show up in auth.json.

karandatwani92 commented 9 months ago

Hey @ada27

You need credentials on client-server too! Ask your client to create a backpack account & get you a license from their account.

ada27 commented 9 months ago

Many thanks @karandatwani92 @backpack-operations I think we can close this issue.