djipco / webmidi

Tame the Web MIDI API. Send and receive MIDI messages with ease. Control instruments with user-friendly functions (playNote, sendPitchBend, etc.). React to MIDI input with simple event listeners (noteon, pitchbend, controlchange, etc.).
Apache License 2.0
1.53k stars 115 forks source link

using v3 with react #208

Closed djipco closed 2 years ago

djipco commented 2 years ago

Discussed in https://github.com/djipco/webmidi/discussions/203

Originally posted by **aphleps** December 8, 2021 I've been using v2.5 with react but didn't manage to get v3 working. After scaffolding a new project with create-react-app I installed webmidi 3.x using npm. When I try to call the API I get the following error. ``` ./node_modules/webmidi/dist/cjs/webmidi.cjs.min.js Module not found: Can't resolve 'perf_hooks' in '/Users/alex/code/react-midi-simple/node_modules/webmidi/dist/cjs' ```
djipco commented 2 years ago

Fixed in 3.0.3.