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 trialKevin Gamboa
Front End Web Development Techdegree Graduate 14,958 Points404 on file path?
Hi all!
I'm working on the challenge and as I download an open the project file running index.html(no codes added by me yet), the console in the developers tool displays a 404 error.
I noticed this is because the current file path is written as below:
xhr.open('GET', '../data/employees.json');
But when I remove "../" as below, it then works.
xhr.open('GET', 'data/employees.json');
Can someone help explain why so? I'm using Visual Code as my workspace, could that be the reason why it shows the 404?
Thanks in advance!
1 Answer
T. Gontarek
7,030 PointsHi Kevin, I have run into this issue a few times. The .../ simply means that it is looking for a file that is another level down. It isn't a VSCode issue. With all the tracks I have used on TreeHouse I have not needed to use the .../ to link files. It's good that you caught that!