mercredi 12 avril 2023

caught TypeError: requireNode is not a function at window.require

''' ( function (win) => { const { requireNode, require: requireAMD } = win; if (requireAMD) { win.require = (...args) => { try { return requireAMD(...args); } catch(error) { if (error.toString().includes('Error: Could not find module')) { return requireNode(...args); } console.error(error); } }; Object.assign(win.require, requireNode, requireAMD); } else {win.require = requireNode;` } })(window); '''

Facing error for requireNode as 'requireNode is not defined' in catch block return requireNode(...args);.




Aucun commentaire:

Enregistrer un commentaire