# Brackets live preview generates a 404

**URL:** <https://discourse.processing.org/t/brackets-live-preview-generates-a-404/38042>\
**Category:** Beginners\
**Created:** [July 21, 2022, 2:52am UTC](https://discourse.processing.org/t/brackets-live-preview-generates-a-404/38042 "2022-07-21T02:52:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![berndbausch](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@berndbausch](https://discourse.processing.org/u/berndbausch)\
**Post date:** [July 21, 2022, 2:52am UTC](https://discourse.processing.org/t/brackets-live-preview-generates-a-404/38042/1 "2022-07-21T02:52:56Z")

</div>

This is on a Windows PC. I am totally new to P5JS (and slightly less new to Processing) and try to use _Brackets_ to edit and test my sketches.

Originally, it worked. I downloaded the _p5js_ ZIP file, unpacked it on the Desktop and started writing programs. I could execute the programs using Brackets Live Preview.

I then moved the folder structure to My Documents (i.e., `c:\users\bbausch\documents\processing\p5js`). Now, live preview doesn’t work anymore; the browser reports two errors

_Failed to load resource: the server responded with a status of 404 (Not Found) p5.js:1_  
and  
_Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico:1_.

The folder structure is:

```auto
...p5js\p5.js
...p5js\my-program
...p5js\my-program\index.html
...p5js\my-program\sketch.js

```

I am using the default _index.html_, which contains the line

```auto
<script data-brackets-id='47' src="../p5.js"></script>

```

I don’t know what the error messages mean. Does the first line in _p5.js_ cause the error? Unlikely, because it’s a comment. Is the _p5.js_ file not found? But why - it’s there! And where does the reference to _favicon.ico_ come from?

When I copy the folder structure to my web server, the sketches run like a charm. I conclude something is wrong with Brackets’ live-preview web server. How to tackle this?

---

<div class="post-metadata">

**Author:** ![Chigoz](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Chigoz](https://discourse.processing.org/u/Chigoz)\
**Post date:** [July 21, 2022, 7:09pm UTC](https://discourse.processing.org/t/brackets-live-preview-generates-a-404/38042/2 "2022-07-21T19:09:31Z")

</div>

I use Visual Studio Code without problems, so I’ll suggest that you use same. Cheers

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 21, 2022, 8:38pm UTC](https://discourse.processing.org/t/brackets-live-preview-generates-a-404/38042/3 "2022-07-21T20:38:50Z")

</div>

> [@berndbausch](#):
>
> Is the “p5.js”" file not found? But why - it’s there!

- That file is located above the root folder.
- Root folder is the 1 containing your “index.html” file.
- I prefer getting the “p5.js” file via CDN btW:

> [@Sketch is displayed twice inside my index.html page](https://discourse.processing.org/t/sketch-is-displayed-twice-inside-my-index-html-page/15335/9):
>
> My advice is to begin w/ a minimum runnable “index.html” template file like this 1: bulb \<script defer src=https://Unpkg.com/p5\>\</script\> \<script defer src=sketch.js\>\</script\> Once verified it’s working, you can add more stuff to it little by little. sunglasses Here’s some online sketch using this very same minimum template: smile_cat
