criblio / js2bin

NodeJS application to native executable
Apache License 2.0
94 stars 17 forks source link

process.binding is deprecated #18

Open asamuzaK opened 4 years ago

asamuzaK commented 4 years ago

process.binding used in _third_party_main.js is deprecated. You need to replace it somehow.

js2bin/_third_party_main.js at master · criblio/js2bin

let source = process.binding('natives')['_js2bin_app_main'];

Ref Deprecated APIs | Node.js v15.1.0 Documentation

neodon commented 4 years ago

Here are some links of interest for this issue. Seems like it will be challenging to replace our usage of process.binding, but not insurmountable.

Move from process.binding to internalBinding: https://github.com/nodejs/node/issues/22160 https://github.com/nodejs/node/pull/24931

This issue has some insightful discussion and suggestions around replacements: https://github.com/nodejs/node/issues/27061

ledbit commented 4 years ago

@asamuzaK thanks for the report. Adding a link to an example migration from process.bindings to internalBinding