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 trialsalcido
6,184 PointsDownloadable 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
56,413 PointsYeah, 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
http-server
Reid Young
Courses Plus Student 14,209 PointsReid Young
Courses Plus Student 14,209 PointsThank you!
Hazel Parreno
18,646 PointsHazel Parreno
18,646 PointsThanks! I had the same problem and is now working.
Adam Beer
11,314 PointsAdam Beer
11,314 PointsThank you Seth!