4

I'm a beginner in laravel, so when I start creating my project using composer create-project laravel/laravel my-project-name 5.4.*

then i run it on my browser http://localhost:8080/test/public/ and it shows me this error:

Warning: require(C:\xampp\htdocs\test\public/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\test\public\index.php on line 24

and

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\test\public/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\test\public\index.php on line 24

I've tried using composer install, update etc.. but nothing seems to happen.

Jigar Shah
  • 6,143
  • 2
  • 28
  • 41
Josel Parayno
  • 181
  • 2
  • 2
  • 10

2 Answers2

4

You'll solve your problem with running in the terminal inside your project

composer update
Sletheren
  • 2,435
  • 11
  • 25
  • Did you do this after cd-ing to the project? Also, when you say it didn't do anything, do you mean the function didn't run? – parker_codes Sep 05 '17 at 17:24
  • This is the output after i run composer update: Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 61 installs, 0 updates, 0 removals - Installing symfony/http-foundation (v3.3.8): Downloading (100%) – Josel Parayno Sep 06 '17 at 05:53
  • @GoogleMac yes i did cd-ed on my root project. – Josel Parayno Sep 06 '17 at 07:59
  • Your index.php page should require the autoload file. Not sure why this isn't already set up on a fresh project. The folder appears to be there, it just isn't being pulled in. – parker_codes Sep 06 '17 at 12:36
0

Try using 'composer diagnose'.

ojikobeshi
  • 124
  • 1
  • 3
  • C:\xampp\htdocs\test>composer global diagnose Changed current directory to C:/Users/TIP-QC/AppData/Roaming/Composer Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK Checking github.com rate limit: OK Checking disk free space: OK Checking pubkeys: Tags Public Key Fingerprint: 57815BAA 7E54SC31 7ECC7CC5 573090D0 877195A6 8F3BB743 4E5D42D0 82A14642 Dev Public Key Fingerprint: 4AC45767 E5EC2265 220C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE51952 – Josel Parayno Sep 06 '17 at 03:21