Big thanks to Roger Wang on the Node-Webkit mailing list

https://github.com/rogerwang/node-webkit/wiki/faq-name-conflict

If your project already has a function called require() it will conflict
with Node's built-in require() which has been integrated into the DOM
window object. In this case you can either disable Node support with the
nodejs field in the manifest, or use this trick at the beginning of your
code:

<script type="text/javascript">
window.requireNode = window.require;
window.require = undefined;
</script>