raszi / node-tmp

Temporary file and directory creator for node.js
MIT License
737 stars 93 forks source link

Running inside Electron #76

Closed jacob-faber closed 8 years ago

jacob-faber commented 8 years ago

Hello,

I am using this module, but running it from Electron's (v0.36.7) renderer process throws:

Uncaught TypeError: existsSync is not a function

I have made little hackfix, but is there a way to somehow shadow default fs module with require('remote').require('fs')?

https://github.com/camabeh/node-tmp/commit/04f2d1d4fbc2fefa809308a028ef780efff2ed06

jacob-faber commented 8 years ago

Ok, I have figured it out, I have to communicate with Main process. :)