user12479221
user12479221

Reputation:

missing script: bootstrap/app.php, after I do composer install

enter image description hereI have an existing laravel project and try to run it.

But after I do a composer install. I get this error:

C:\xampp\htdocs\laravel>php artisan PHP Warning: require_once(C:\xampp\htdocs\laravel/bootstrap/app.php): failed to open stream: No such file or directory in C:\xampp\htdocs\laravel\artisan on line 20

of course I googled first. But I don't see any solution.

So what I have to change?

Thank you

this is the composer.json file:


{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.0.0",
        "barryvdh/laravel-dompdf": "^0.8",
        "components/jquery": "^3.2",
        "facade/ignition": "^1.11",
        "fideloper/proxy": "~4.0",
        "guzzlehttp/guzzle": "^6.3",
        "ibericode/vat": "^2.0",
        "iio/libmergepdf": "^4.0",
        "intervention/image": "^2.4",
        "itsgoingd/clockwork": "^4.0",
        "laracasts/flash": "^3.0",
        "laravel/framework": "^6.2",
        "laravel/tinker": "~1.0",
        "maatwebsite/excel": "^3.0",
        "nesbot/carbon": "^2.0.0",
        "owen-it/laravel-auditing": "^9.0",
        "phpoffice/phpword": "^0.17.0",
        "picqer/moneybird-php-client": "^0.15.0",
        "picqer/php-barcode-generator": "^0.2.2",
        "sensiolabs/security-checker": "^4.1",
        "spatie/laravel-activitylog": "^3.5",
        "spatie/laravel-permission": "^3.0",
        "twbs/bootstrap": "^4.1"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~7.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "Intranet\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }

    },
    "extra": {
        "laravel": {
            "dont-discover": ["laravel/dusk"]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ],
        "post-update-cmd": [
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

Upvotes: 2

Views: 5616

Answers (1)

Kamlesh Paul
Kamlesh Paul

Reputation: 12391

download zip from here then copy only bootstrap folder from this zip and put in your root dir

enter image description here

as i can see

 "psr-4": {
            "Intranet\\": "app/"
        }

Note : - so every file you are copy from laravel orignal zip change namespace as app to Intranet

Upvotes: 1

Related Questions