[p5.js 2.0 Beta Bug Report]: Output a friendly error when p5 is loaded twice on a page
Open
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:
- Go to the p5 website repo
- Switch the 2.0 branch
- Run
npm run dev - Open the reference for e.g. circle at http://localhost:4321/reference/p5/circle/
You see this error in the console
Not sure what the cause is just yet. Doesn't seem to affect the examples though.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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