-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The module "midi" is supposedly non-context-aware, despite being updated to support Electron. #35
Comments
Hello!
Sorry, I haven't tried this in Electron yet so I'm not really sure what it
might be. If you figure out it would you please post an update?
Thanks!!
…On Wed, Jan 19, 2022 at 3:47 PM Mr. SOSA ***@***.***> wrote:
Forgive me if I'm making some sort of mistake, but I am trying to load
easymidi into my Electron app. Upon requiring the package, I get the
following error:
Uncaught Error: Loading non-context-aware native module in renderer:
'\\?\C:\Users\my_user\Documents\Midi-App\midi-electron\node_modules\midi\build\Release\midi.node'.
See electron/electron#18397.
Upon further research, I see that midi *was* in fact updated to be
context aware, and your wrapper *does* use the latest version, so what
gives?
To reproduce the error, simply add const easymidi = require('easymidi');
to your main.js file before running npm start.
—
Reply to this email directly, view it on GitHub
<#35>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI42WPHAL7XEU7PQ4IU26DUW4PNRANCNFSM5MK6YVTA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I'll try and wrestle with it and see what I can do to avoid this error. I'm not too familiar with context awareness, but I do know it involves thread management, per this article. And I do know that Electron no longer allows non-context-aware modules to be loaded into an application, per this issue. |
Much appreciated! If there's a pull request or patch I can apply to fix it
I'll be happy to do so.
…On Wed, Jan 19, 2022 at 4:11 PM Mr. SOSA ***@***.***> wrote:
I'll try and wrestle with it and see what I can do to avoid this error.
I'm not too familiar with context awareness, but I do know it involves
thread management, per this article
<https://nodejs.github.io/node-addon-examples/special-topics/context-awareness/>.
And I do know that Electron no longer allows non-context-aware modules to
be loaded into an application, per this issue
<electron/electron#18397>. midi already adapted
to this new standard <justinlatimer/node-midi#214>,
and your wrapper was updated to support it, so I'm not sure where the
disconnect is. I'll try and fiddle with it a little more.
—
Reply to this email directly, view it on GitHub
<#35 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI42WP55J54F7QSVBHUEOLUW4SG5ANCNFSM5MK6YVTA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Upon further inspection, it appears that the original |
Forgive me if I'm making some sort of mistake, but I am trying to load
easymidi
into my Electron app. Upon requiring the package, I get the following error:Uncaught Error: Loading non-context-aware native module in renderer: '\\?\C:\Users\my_user\Documents\Midi-App\midi-electron\node_modules\midi\build\Release\midi.node'. See https://github.com/electron/electron/issues/18397.
Upon further research, I see that
midi
was in fact updated to be context aware, and your wrapper does use the latest version, so what gives?To reproduce the error, simply add
const easymidi = require('easymidi');
to yourmain.js
file before runningnpm start
.The text was updated successfully, but these errors were encountered: