processing / processing/p5.js

[p5.js 2.0 Beta Bug Report]: Output a friendly error when p5 is loaded twice on a page

Open
#7,687 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:Core p5.js 2.0+
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
p5.js version

2.0 beta 5

Web browser and version

Firefox

Operating system

MacOS

Steps to reproduce this
Steps:
  1. Go to the p5 website repo
  2. Switch the 2.0 branch
  3. Run npm run dev
  4. Open the reference for e.g. circle at http://localhost:4321/reference/p5/circle/

You see this error in the console
Image

Not sure what the cause is just yet. Doesn't seem to affect the examples though.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

In the p5.js website repository, switch to the 2.0 branch and run npm run dev, then open the reference for circle at the provided local URL to reproduce the console error. Trace why p5 is loaded twice and define completion as showing a friendly error while leaving the examples working.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.