Error launching JS inspector: _open(...).default.openApp is not a function
I've installed last version on my Windows 11 and after click on Open JS Debugger on Android emulator - the error on terminal in Visual Studio Code - Error launching JS inspector: _open(...).default.openApp is not a function. Help!
Had same issue and managed to figure out a workaround.
I modified the default export in node_modules\open\open-main.js to include .openApp():
module.exports = {
openMain: function (target, opts) {
if (process.env.REACT_DEBUGGER) {
if (opts.app) {
console.log("Debugger for React Native is configured. Skipping launch of " + opts.app);
}
return;
}
return open(target, opts);
},
openApp: open.openApp,
};
And now I can launch the debugger 🤔 I'm on Windows 10, btw
Coool! It's working now!! Tnx a lot!
@Seagullie could you explain why this feature does not work straight out of the box when just installing expo?
@Seagullie I tried the changes that you implemented but it is still giving the same error. I am on Windows 11 if that matters.
Had same issue and managed to figure out a workaround.
I modified the default export in
node_modules\open\open-main.jsto include .openApp():module.exports = { openMain: function (target, opts) { if (process.env.REACT_DEBUGGER) { if (opts.app) { console.log("Debugger for React Native is configured. Skipping launch of " + opts.app); } return; } return open(target, opts); }, openApp: open.openApp, };And now I can launch the debugger 🤔 I'm on Windows 10, btw
Yup, this works! I changed the open-main.js file and added the "jsEngine": "hermes", to the app.json file.
i've installed as a direct requirement via npm install open, for some reason applying that patch didn't work for me.
I had this issue and editing the node module didn't work, but deleting node_modules and package.lock.json or yarn.lock abd then re-installing packages magically fixed this for me. I should say it worked for me, then stopped working, so it's not like I've never been able to get it to work like some people may be experiencing