# Having trouble getting P5 JS to work in repl.it

**URL:** <https://discourse.processing.org/t/having-trouble-getting-p5-js-to-work-in-repl-it/349>\
**Category:** p5.js\
**Created:** [May 24, 2018, 7:20pm UTC](https://discourse.processing.org/t/having-trouble-getting-p5-js-to-work-in-repl-it/349 "2018-05-24T19:20:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ComposerShield](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@ComposerShield](https://discourse.processing.org/u/ComposerShield)\
**Post date:** [May 24, 2018, 7:20pm UTC](https://discourse.processing.org/t/having-trouble-getting-p5-js-to-work-in-repl-it/349/1 "2018-05-24T19:20:34Z")

</div>

Hi there, I’m a newcomer to using P5 JS. I have HTML, CSS, and JS loaded up in repl.it. In the head of the HTML, I added the script src="…/p5.js" thing and the src=“path/to/p5.sound.js” thing (I can’t copy the whole thing in here or it doesn’t show up) like the website said, but it doesn’t seem to work.

The basic load and play an audio file code was copy pasted and it doesn’t work, it doesn’t even seem to automatically run the preload and setup functions like it’s supposed to. Any help would be appreciated.

---

<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:** [May 24, 2018, 7:57pm UTC](https://discourse.processing.org/t/having-trouble-getting-p5-js-to-work-in-repl-it/349/2 "2018-05-24T19:57:12Z")

</div>

> [@ComposerShield](#):
>
> … loaded up in repl.it. In the head of the HTML, I added the…

If that

> **[Replit: The software creation platform. IDE, AI, and Deployments](https://replit.com/)**
>
> Run code live in your browser. Write and run code in 50+ languages online with Replit, a powerful IDE, compiler, & interpreter.

is similar to:

> **[CodePen](https://codepen.io/)**
>
> An online code editor, learning environment, and community for front-end web development using HTML, CSS and JavaScript code snippets, projects, and web applications.

You can try out my minimum “.html” template I use there: 🕶

```auto
<script defer src=https://CDN.JSDelivr.net/npm/p5></script>
<!--<script defer src=https://CDN.JSDelivr.net/npm/p5/lib/addons/p5.dom.min.js></script>-->
<!--<script defer src=https://CDN.JSDelivr.net/npm/p5/lib/addons/p5.sound.min.js></script>-->

<!-- <script src=sketch.js></script> -->

```

An online example using that “.html” template: 👼

[Bouncing Colorful Balls](http://CodePen.io/GoSubRoutine/pen/KaerGb/right?editors=101)
