[p5.js 2.0+ Bug Report]: createVector() gives error "TypeError: this._friendlyError is not a function"
p5.js 2.0+
### 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
- [x] Friendly errors
- [ ] Other (specify if possible)
### p5.js version
v2.3.0-rc.1
### Web browser and version
Brave 1.90.122
### Operating system
Linux Mint 6.8.0-117
### Steps to reproduce this
I was trying v2.3.0-rc.1 with the code snippet from issue 8117 to see if this release candidate fixed that issue. The `createVector()` line started giving a warning in version 2.1 to always use arguments when calling `createVector`. But v2.3.0-rc.1 gives a hard error "TypeError: this._friendlyError is not a function".
### Snippet:
```js
function setup() {
createCanvas(400,400);
const v=createVector(100,0);
const w=createVector();
v.sub(w);
console.log(v.toString());
v.rotate(1);
console.log(v.toString());
}
```
关闭于 2026-05-27 2 条评论