Skip to content

[p5.js 2.0+ Bug Report]: Wrong version of p5-sound included in complete library zip #9037

Description

@fadookie

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • WebGPU
  • p5.strands
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

v2.3.1

Web browser and version

Vivaldi Version: 8.1.4087.58 (Official Build) (arm64) Chromium Version: 150.0.7871.208 Channel: Official Build Platform / OS: macOS Version 26.6 (Build 25G72) Executable Path: /Applications/Vivaldi.app/Contents/MacOS/Vivaldi Command Line: /Applications/Vivaldi.app/Contents/MacOS/Vivaldi --flag-switches-begin --flag-switches-end --origin-trial-disabled-features=CanvasTextNg|WebAssemblyCustomDescriptors --disable-smooth-scrolling

Operating system

macOS 26.6

Steps to reproduce this

Steps:

  1. Download the p5.js complete library from https://p5js.org/download/
  2. Uncomment the line that says <script src="../addons/p5.sound.js"></script>
  3. Start a webserver to serve the sketch, e.g. python3 -m http.server 8080 and navigate to the example page. With this python command it would be http://localhost:8080/empty-example/
  4. Open web inspector console

Expected

Sound plays with no error

Actual

An error is logged to the console:

Uncaught TypeError: p5.prototype.registerMethod is not a function
    at Module.<anonymous> (p5.sound.js:1195:14)
    at __webpack_require__ (p5.sound.js:84:22)
    at p5.sound.js:120:10
    at p5.sound.js:122:2

Pre-constructed repro case:

p5js-sound-error-repro.zip

It seems as if the wrong version of p5 sound may be included with the current distribution of p5.js.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions