# A p5js mode problem?

**URL:** <https://discourse.processing.org/t/a-p5js-mode-problem/9861>\
**Category:** p5.js\
**Created:** [April 2, 2019, 9:54am UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861 "2019-04-02T09:54:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricRogerGarcia](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ericrogergarcia/32/21029_2.png) [@EricRogerGarcia](https://discourse.processing.org/u/EricRogerGarcia)\
**Post date:** [April 2, 2019, 9:54am UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/1 "2019-04-02T09:54:34Z")

</div>

Hello,

I tried a very P5JS simple sketch and it doesn’t work in the with P5JS mode. It works fine in P5JS webeditor.

I’ve got : Syntax Error : “Expected an operand but found class”

The code is

```auto
 "use strict";

let bubble;

function setup() {
  createCanvas(400,400);
  bubble = new Bubble(100);
}

function draw() {
  background(255);
  bubble.display();
}

class Bubble {
  constructor(width_) {
    this.width_ = width_;
  }
  
  display() {
    ellipse(mouseX,mouseY,this.width_,this.width_);
  }
}

```

I don’t understand !!!  
☹

---

<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:** [April 2, 2019, 11:18am UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/2 "2019-04-02T11:18:21Z")

</div>

p5js Mode doesn’t seem to be compatible w/ JS ECMA 6 / 2015. 😷

But if you prefer to code locally, here are some tips: 😇

> [@Code 800A0404 issue](https://discourse.processing.org/t/code-800a0404-issue/2036/3):
>
> Easiest & fastest recipe to run “.js” sketches under p5.js: running_man Install any Firefox-based browser in your OS and use it to open your “index.html” file: fox_faceInstall Notepad2 or Notepad++ (or both) in your OS and use it to type in your “sketch.js” file there: scroll[https://XhmikosR.GitHub.io/notepad2-mod/](https://XhmikosR.GitHub.io/notepad2-mod/)[https://Notepad-Plus-Plus.org](https://Notepad-Plus-Plus.org) You can setup those text editors to use UTF-8 and LF line endings for better compatibility. bulbHere’s my minimum “index.html” te…

---

<div class="post-metadata">

**Author:** ![EricRogerGarcia](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ericrogergarcia/32/21029_2.png) [@EricRogerGarcia](https://discourse.processing.org/u/EricRogerGarcia)\
**Post date:** [April 2, 2019, 12:00pm UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/3 "2019-04-02T12:00:35Z")

</div>

thank you

I wonder if (and when) p5js mode is going to be compatible with ECMA6 !!!

as an other alternative, what of the old p5js local javascript editor (made with node.js) ???

(My OS is Linux Mint - Mate edition)

---

<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:** [April 2, 2019, 12:06pm UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/4 "2019-04-02T12:06:32Z")

</div>

I believe all offline p5js IDEs have stopped being developed. 🛑

---

<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:** [April 2, 2019, 12:12pm UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/5 "2019-04-02T12:12:06Z")

</div>

But you can take a look at this forum post below: 😉

> [@P5.js Desktop Editor](https://discourse.processing.org/t/p5-js-desktop-editor/9728):
>
> Hello everyone. Please let me know if this is not the place for my question. Im trying to compile my own version of the old p5.js desktop editor but is an absolute headache, due to the fact that it is abandoned and some of the dependencies no longer exist. The reason for doing this is that is a great tool for teaching kids and yung people without the troubles of a web editor (internet conecction issues mainly) or external tools with less friendly interfaces. Of course i could use the latest …

---

<div class="post-metadata">

**Author:** ![EricRogerGarcia](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ericrogergarcia/32/21029_2.png) [@EricRogerGarcia](https://discourse.processing.org/u/EricRogerGarcia)\
**Post date:** [April 2, 2019, 12:53pm UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/6 "2019-04-02T12:53:56Z")

</div>

thanks

you can’t make anything serious with the web editor

it’s just good for educational purpose .

---

<div class="post-metadata">

**Author:** ![zenemig](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zenemig/32/4418_2.png) [@zenemig](https://discourse.processing.org/u/zenemig)\
**Post date:** [April 2, 2019, 4:35pm UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/7 "2019-04-02T16:35:31Z")

</div>

> [@EricRogerGarcia](#):
>
> it’s just good for educational purpose .

That is one of the main reasons I post what @GoToLoop is linking.  
As said before, all versions of offline IDEs are abandoned. I contacted some of the developers of the last version of the desktop IDE and no one is working on it, and all dependences are outdated. But for most cases i think the old desktop editor keep working, like your example code. Just tested and it work.

---

<div class="post-metadata">

**Author:** ![EricRogerGarcia](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ericrogergarcia/32/21029_2.png) [@EricRogerGarcia](https://discourse.processing.org/u/EricRogerGarcia)\
**Post date:** [April 2, 2019, 5:00pm UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/8 "2019-04-02T17:00:17Z")

</div>

I don’t understand. No it doesn’t work !!!

[see here](http://ericrogergarcia.legtux.org/no-it-doesn-t-work-)

Processing 3 5 3 and nothing to update

☹

P.S. How come it works for you !!!???

Linux version

---

<div class="post-metadata">

**Author:** ![zenemig](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zenemig/32/4418_2.png) [@zenemig](https://discourse.processing.org/u/zenemig)\
**Post date:** [April 2, 2019, 5:15pm UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/9 "2019-04-02T17:15:22Z")

</div>

Hi @EricRogerGarcia,

I was talking about the old p5.js dektop editor. You still can download it from here:

> **[processing/p5.js-editor](https://github.com/processing/p5.js-editor/releases/tag/v0.6.2)**
>
> Deprecated desktop editor for p5.js. Contribute to processing/p5.js-editor development by creating an account on GitHub.

I just tested on Windos and it works. I cant tell you about the Linux version.

 ![capture1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0481eee7e805ab6f3952ec43c4a591fe6e347d3c.png)

---

<div class="post-metadata">

**Author:** ![EricRogerGarcia](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ericrogergarcia/32/21029_2.png) [@EricRogerGarcia](https://discourse.processing.org/u/EricRogerGarcia)\
**Post date:** [April 2, 2019, 7:37pm UTC](https://discourse.processing.org/t/a-p5js-mode-problem/9861/10 "2019-04-02T19:37:55Z")

</div>

ok

thank you very very much 😃
