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

JavaScript AngularJS Basics (1.x) Services in Angular Using Services To Get Data

XMLHttpRequest: cannot load

Does anyone else get this error?

'Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.'

3 Answers

jessica grinberg
jessica grinberg
14,117 Points

I had the same issue and figured out we need to see the app on a server so you can type in your terminal inside your application folder:

python -m SimpleHTTPServer visit http://localhost:8000/

this should fix it

Johan Marais
Johan Marais
15,920 Points

Thank you this helped, However i'm running of my Mac and thus did the following;

Open Terminal and ran the following command

npm install httpserver -g

Once installed cd into your current directory and run the command


NB! :This all takes into account that you do have Node installed on your computer

Lanre TH
Lanre TH
1,037 Points

npm install httpserver -g then http-server

Hello guys, On 18th of January i am going to start a social networking website so i am looking for some talented front end and back end developers

my email is lakindu1.jayathilaka@gmail.com contact me if u are interested, there are 2 people in my team for now