You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short of it is I receive Module did not self-register when importing midi in a worker. Happy to produce a repro case if that helps, really it's just two files: one that launches the worker, and a worker script that imports midi.
Here is the error I receive for context:
events.js:187
throw er; // Unhandled 'error' event
^
Error: Module did not self-register: '/Users/foo/app/node_modules/midi/build/Release/midi.node'.
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1190:18)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (internal/modules/cjs/helpers.js:69:18)
at bindings (/Users/foo/app/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/Users/foo/app/node_modules/midi/midi.js:1:31)
at Module._compile (internal/modules/cjs/loader.js:1121:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
Emitted 'error' event on Worker instance at:
at Worker.[kOnErrorMessage] (internal/worker.js:187:10)
at Worker.[kOnMessage] (internal/worker.js:197:37)
at MessagePort.<anonymous> (internal/worker.js:125:57)
at MessagePort.emit (events.js:210:5)
at MessagePort.onmessage (internal/worker/io.js:70:8)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @foo/app@1.0.0 start: `NODE_OPTIONS=--no-warnings node demo/index.mjs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @foo/app@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/foo/.npm/_logs/2020-02-14T05_35_40_727Z-debug.log
Sidenote: I was importing this package in a worker because I wanted to see if that would cause this package not to take control of the terminal (I have no idea, was just stabbing in the dark). If anyone has an idea how I can open an input port and maintain ability to read terminal input without using separate processes or threads I'd be grateful.
The text was updated successfully, but these errors were encountered:
My apologies. Got so used to working with experimental modules in node 13 that I didn't think to check if that was the cause. Using common-js and everything is fine. Please feel free to close.
Edit: everything is fine in workers regardless of mjs/cjs. Something else is wrong in my program. I need some sleep.
Hello. It seems node-midi is impacted by the issue linked below, which appears to have a fix contained within:
nodejs/node#21783
Short of it is I receive
Module did not self-register
when importing midi in a worker. Happy to produce a repro case if that helps, really it's just two files: one that launches the worker, and a worker script that importsmidi
.Here is the error I receive for context:
Sidenote: I was importing this package in a worker because I wanted to see if that would cause this package not to take control of the terminal (I have no idea, was just stabbing in the dark). If anyone has an idea how I can open an input port and maintain ability to read terminal input without using separate processes or threads I'd be grateful.
The text was updated successfully, but these errors were encountered: