# Canvas not showing up at all

**URL:** https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800
**Category:** Beginners
**Created:** [June 12, 2020, 5:32am UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800 "2020-06-12T05:32:20Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![KaiShaw91](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@KaiShaw91](https://discourse.processing.org/u/KaiShaw91)
#### Post date: [June 12, 2020, 5:32am UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/1 "2020-06-12T05:32:20Z")

</div>

i cant get the download version to work when i load the index.html i dont see the canvas at all  
`setup{ createcanvas(400,400) } draw{ background(220); rect(5,5,40,30); }`  
everything else is vanilla what it my problem

Edit:  
narrowed it down to p5.sound.js stick up on loading

i get a div with p5\_loading

---

<div class="post-metadata">

### Author: ![Sven](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sven/32/8293_2.png) [@Sven](https://discourse.processing.org/u/Sven)
#### Post date: [June 12, 2020, 7:45am UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/2 "2020-06-12T07:45:46Z")

</div>

Hello, and welcome to the forum!

The code snippet you’re posting has syntax errors. Computers are picky. 😊 It has nothing to do with `p5.sound.js`. If you fix the syntax errors, your sketch will run:

```javascript
// The function keyword has to be present.
function setup() {
  // Case is important, createcanvas won't work.
  createCanvas(400, 400); 
}

function draw() {
  background(220);
  rect(5, 5, 40, 30);
}

```

---

<div class="post-metadata">

### Author: ![KaiShaw91](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@KaiShaw91](https://discourse.processing.org/u/KaiShaw91)
#### Post date: [June 12, 2020, 4:59pm UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/3 "2020-06-12T16:59:47Z")

</div>

Thanks but I did eventually get it to show

I had to get rid of p5.sound.js though  
How can I get p5.sound.js to work

---

<div class="post-metadata">

### Author: ![ARNAV\_A\_GUPTA](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/arnav_a_gupta/32/9660_2.png) [@ARNAV\_A\_GUPTA](https://discourse.processing.org/u/ARNAV_A_GUPTA)
#### Post date: [June 19, 2020, 8:58am UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/4 "2020-06-19T08:58:28Z")

</div>

in the index.html, write like this below the line where its written p5.play.js

`<script src="p5.sound.js"></script>`

don’t forget to put the file in the same folder as index.html

---

<div class="post-metadata">

### Author: ![ARNAV\_A\_GUPTA](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/arnav_a_gupta/32/9660_2.png) [@ARNAV\_A\_GUPTA](https://discourse.processing.org/u/ARNAV_A_GUPTA)
#### Post date: [June 19, 2020, 8:59am UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/5 "2020-06-19T08:59:28Z")

</div>

“”(without double codes before and after script)

---

<div class="post-metadata">

### Author: ![KaiShaw91](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@KaiShaw91](https://discourse.processing.org/u/KaiShaw91)
#### Post date: [June 19, 2020, 4:44pm UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/6 "2020-06-19T16:44:37Z")

</div>

I’ve tried that all I get on the page is a div that says loading

---

<div class="post-metadata">

### Author: ![ARNAV\_A\_GUPTA](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/arnav_a_gupta/32/9660_2.png) [@ARNAV\_A\_GUPTA](https://discourse.processing.org/u/ARNAV_A_GUPTA)
#### Post date: [June 19, 2020, 7:11pm UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/7 "2020-06-19T19:11:07Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/983be8bf7d3cb8f76ed16353773ff70dbd3ad179.png) are you sure??

---

<div class="post-metadata">

### Author: ![KaiShaw91](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@KaiShaw91](https://discourse.processing.org/u/KaiShaw91)
#### Post date: [June 19, 2020, 7:24pm UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/8 "2020-06-19T19:24:20Z")

</div>

I did get p5.sound.min to work by using the one from downloading it from the web editor.  
but straight from the download section

I haven’t gotten it to work

---

<div class="post-metadata">

### Author: ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)
#### Post date: [June 19, 2020, 9:47pm UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/9 "2020-06-19T21:47:23Z")

</div>

> [@KaiShaw91](#):
>
> setup{ createcanvas(400,400) } draw{ background(220); rect(5,5,40,30); }

I see several syntax errors, such as: missing the keyword `function`, missing `()` after the function names, and incorrect case on `createCanvas()`. Can you share your code? I am guessing the syntax errors are breaking your program …

---

<div class="post-metadata">

### Author: ![KaiShaw91](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@KaiShaw91](https://discourse.processing.org/u/KaiShaw91)
#### Post date: [June 19, 2020, 10:01pm UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/10 "2020-06-19T22:01:15Z")

</div>

Im aware I should have specified it was sudo code

The issue was with p5.sound.js  
Because when I removed it from the index.html I got my sketch to work

---

<div class="post-metadata">

### Author: ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)
#### Post date: [June 20, 2020, 12:47am UTC](https://discourse.processing.org/t/canvas-not-showing-up-at-all/21800/11 "2020-06-20T00:47:53Z")

</div>

K … glad you got is solved.

Sounds like you may need to further investigate your issue though for when you want to use the sound lib.
