Looks like there's a problem with your dependencies, can you try:
composer update --no-scripts
This will allow you to install your composer dependencies without executing the post scripts.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\xampp\htdocs\lns-web-master\bootstrap\app.php:14 Stack trace: #0 C:\xampp\htdocs\lns-web-master\public\index.php(22): require() #1 {main} thrown in C:\xampp\htdocs\lns-web-master\bootstrap\app.php on line 14
Looks like there's a problem with your dependencies, can you try:
composer update --no-scripts
This will allow you to install your composer dependencies without executing the post scripts.
I have tried but it shows same error and i have tried composer dump-autoload
can u go to your vendor/laravel/Illuminate/Foundation and see Application.php file there? perhaps if its ur first time u need composer install?
Run npm install and composer update
@realrandyallen i have tried what you have said buti have got error as not find an GIT path?
Could it be a permissions issue - like your web server cant read the files ( If they exist in the first place )
does the project contain both composer.json and composer.lock in the root of the project?
are you running composer install in the root of the project?
I am running composer install in master of project and yes both of that included in project root.
master of project
what does that mean?
The main project. Laravel version 5.3.
@realrandyallen when i tried npm install below error occered in terminal.
Start with an EMPTY folder.
Clone the GIT repository
Run Composer Install (not update)
Its nothing to do with NPM at this stage.
The only useful thing I've seen in the error messages is it complaining that it can't find git in $path. Do you have git installed globally?
After you cloned the repo, did you install the dependencies?
Let me check and let asap.
@cronix I have tried using Git bash but still same error.
It doesn't mater what git you use if it isn't made globally accessible by being in your systems $PATH.
can you go to any dir and type git and get the git menu?
@cronix Yes it can do like that.I can't see my .env file but laravel version is 5.3 and git version 2.20.1.windows.1.
Any helps
If this happen because of upgrade version of composer?
@MUNAZZIL - the .(dot) files are hidden by default on windows. go to the folder and do ctrl + H for displaying hidden files.
Also .env file will not be available for newly cloned projects. You have to copy the .env.sample file and paste it as .env on the same location.
@ajithlal I am getting this error now.
Fatal error: Class 'Illuminate\Foundation\Application' not found in C:\xampp1\htdocs\lns-web-master\bootstrap\app.php on line 14
Remove the composer.lock file and vendor folder and run
composer install
I am getting following error
Warning: require(C:\xampp1\htdocs\lns-web-master\public/../bootstrap/app.php): failed to open stream: No such file or directory in C:\xampp1\htdocs\lns-web-master\public\index.php on line 22
Fatal error: require(): Failed opening required 'C:\xampp1\htdocs\lns-web-master\public/../bootstrap/app.php' (include_path='C:\xampp1\php\PEAR') in C:\xampp1\htdocs\lns-web-master\public\index.php on line 22
This error is occurred due to the composer dependency not completely added. Is the composer install is successfull?
@ajithlal Yes it says nothing to install or update and CMD also display above error.
I think your project missing some file. try git pull or clone the project once again. check the cloning is successful and run composer install on the fresh project
With that i don't have a documentation for that project.How do i know what are the packages that had been install for this project sometimes error might occur because of that?
composer.json tells you (and composer) what packages need to be installed.
@snapy Can you please tell me with this,I was in very troube.
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"doctrine/dbal": "^2.5",
"illuminate/html": "^5.0",
"laravelcollective/html": "^5.3",
"nesbot/carbon": "^1.21",
"maatwebsite/excel": "^2.1",
"barryvdh/laravel-dompdf": "^0.8.0",
"h4cc/wkhtmltopdf-amd64": "0.12.x",
"h4cc/wkhtmltoimage-amd64": "0.12.x",
"barryvdh/laravel-snappy": "^0.4.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "^5.3",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\Foundation\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\Foundation\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
Please or to participate in this conversation.