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 React Basics (retired) First Steps in React Our First Application

Downloadable project files do not run. Error: Cross origin requests are only supported for protocol schemes:

I'm trying to run this locally so I downloaded the files but they don't run in the browser. Console shows this error:

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

1 Answer

Seth Kroger
Seth Kroger
56,413 Points

Yeah, the project is meant to be run from Workspaces or an HTTP server. If you want to run it locally I'd suggest using NodeJS in the Terminal/Command Line (which you'll need for subsequent courses anyway) and installing http-server the globally. Then you can run the command in the directory and it will a mini server to serve the files and satisfy the CORS rules.

npm install -g http-server


Thank you!

Hazel Parreno
Hazel Parreno
18,646 Points

Thanks! I had the same problem and is now working.