Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

httpserver

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