# Import class other file syntax error

**URL:** <https://discourse.processing.org/t/import-class-other-file-syntax-error/45358>\
**Category:** Beginners\
**Created:** [November 19, 2024, 2:42pm UTC](https://discourse.processing.org/t/import-class-other-file-syntax-error/45358 "2024-11-19T14:42:10Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [November 20, 2024, 12:09pm UTC](https://discourse.processing.org/t/import-class-other-file-syntax-error/45358/9 "2024-11-20T12:09:30Z")

</div>

> [@edufissure](#):
>
> In index.html i have only:

Can you post your “index.html” file?

> [@edufissure](#):
>
> It’s weird that p5.js works different and lacks documentation about it…

p5.js itself is a regular .js library file, not a module 1.

Indeed they’ve never yet cared about using ECMA module (.mjs) files in the browser!

But weirdly, they do care about Node.JS’ Common module (.cjs) files, even though p5.js isn’t a backend library, but a frontend 1!

---

_[View the full topic](https://discourse.processing.org/t/import-class-other-file-syntax-error/45358)._
