Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Laravel 4 Basics Getting Started with Laravel Installing Laravel

Bryan Lam
Bryan Lam
15,592 Points

Composer unable to create project: [Composer\Downloader\TransportException].... HTTP Request Failed!

I am at the step where I execute the command:

composer create-project laravel/laravel laravel-basics --prefer-dist

but I keep getting an error in the form of:

[Composer\Downloader\TransportException] The "http://packagist.org/p/laravel/laravel$d591ecdcd517c0783d877709a30ecca 75895c23bd1080b84c4fd67c772f975d6.json" file could not be downloaded: faile d to open stream: HTTP request failed!

Could someone please help me?

2 Answers

Bryan Lam
Bryan Lam
15,592 Points

I was able to figure it out, I had a web filter that was blocking the app from downloading through the vm!

Chris Shaw
Chris Shaw
26,676 Points

Glad you got it fixed, sorry I didn't respond earlier, missed it among the stack of other emails I receive daily.

Chris Shaw
Chris Shaw
26,676 Points

Hi Bryan,

Have a read of the following article which should fix the issue you're having.

http://codinginharmony.blogspot.com.au/2012/10/forcing-composer-to-use-https.html

Hope that helps.

Bryan Lam
Bryan Lam
15,592 Points

Hey Chris,

Thanks for the reply. I have looked at this solution but I'm not sure where to put the modified JSON file for composer to look up. Would it be on my local Homestead folder or on the Vagrant "Sites" folder that I had set up in the tutorial?

From my understanding, composer is installed on the virtualized vagrant, so the JSON should be put in that area (not on local machine since I don't have composer installed -- I'm using WINDOWS by the way)? If so, how would I change the JSON file in the vagrant folder?

Please correct me if I don't understand this correctly. Still wrapping my head around this.

Thanks! Bryan