wellsjo / JSON-Splora

GUI app for editing, visualizing, and manipulating JSON data
MIT License
1.86k stars 60 forks source link

using nvm tmp dir is not created on install #71

Open kangman opened 7 years ago

kangman commented 7 years ago

installed into nvm for node v7.1.0 and got an error that a tmp dir was not available to write in.

Uncaught Exception:
Error: ENOENT: no such file or directory, open '/Users/dakang/.nvm/versions/node/v7.1.0/lib/node_modules/json-splora/app/tmp/input.json'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
    at Object.fs.writeFileSync (fs.js:1343:33)
    at App.createWindow (/Users/dakang/.nvm/versions/node/v7.1.0/lib/node_modules/json-splora/index.js:43:10)
    at emitTwo (events.js:111:20)
    at App.emit (events.js:191:7)

~/.nvm/versions/node/v7.1.0/lib/node_modules/json-splora/app/tmp

making this directory resolved the issue.

can this tmp dir be created on install?

wellsjo commented 7 years ago

The tmp directory is created on app startup, so I feel like this may be permissions related, and there may be a warning missing. Then the error happens later when the app tries to write to it.