{"action":"created","issue":{"url":"https://api.github.com/repos/shelljs/shelljs/issues/248","repository_url":"https://api.github.com/repos/shelljs/shelljs","labels_url":"https://api.github.com/repos/shelljs/shelljs/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/shelljs/shelljs/issues/248/comments","events_url":"https://api.github.com/repos/shelljs/shelljs/issues/248/events","html_url":"https://github.com/shelljs/shelljs/issues/248","id":114443223,"number":248,"title":"exec command not working. Showing \"shell.js : internal error\" in nwjs","user":{"login":"dvenkatsagar","id":14003522,"avatar_url":"https://avatars.githubusercontent.com/u/14003522?v=3","gravatar_id":"","url":"https://api.github.com/users/dvenkatsagar","html_url":"https://github.com/dvenkatsagar","followers_url":"https://api.github.com/users/dvenkatsagar/followers","following_url":"https://api.github.com/users/dvenkatsagar/following{/other_user}","gists_url":"https://api.github.com/users/dvenkatsagar/gists{/gist_id}","starred_url":"https://api.github.com/users/dvenkatsagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvenkatsagar/subscriptions","organizations_url":"https://api.github.com/users/dvenkatsagar/orgs","repos_url":"https://api.github.com/users/dvenkatsagar/repos","events_url":"https://api.github.com/users/dvenkatsagar/events{/privacy}","received_events_url":"https://api.github.com/users/dvenkatsagar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shelljs/shelljs/labels/fix","name":"fix","color":"fc2929"},{"url":"https://api.github.com/repos/shelljs/shelljs/labels/low%20priority","name":"low priority","color":"aaaaaa"},{"url":"https://api.github.com/repos/shelljs/shelljs/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-01T01:00:06Z","updated_at":"2016-02-09T07:45:06Z","closed_at":null,"body":"Im trying to do a basic command taken from the documentation.\r\n\r\n```javascript\r\nvar version = exec('node --version', {silent:true}).output;\r\n```\r\n\r\nand it shows the following output\r\n\r\n```bash\r\n[23008:1031/205417:INFO:CONSOLE(191)] \"\"shell.js: internal error\"\", source: /home/sagar/Repositories/Scripts/Projects/node/ubic/ubic/node_modules/shelljs/src/common.js (191)\r\n[23008:1031/205417:INFO:CONSOLE(192)] \"\"Error: ENOENT: no such file or directory, open '/tmp/shelljs_7712d2f4992c056323b3'\\n    at Error (native)\\n    at Object.fs.openSync (fs.js:540:18)\\n    at Object.fs.readFileSync (fs.js:392:15)\\n    at execSync (/home/sagar/Repositories/Scripts/Projects/node/ubic/ubic/node_modules/shelljs/src/exec.js:109:24)\\n    at Object._exec (/home/sagar/Repositories/Scripts/Projects/node/ubic/ubic/node_modules/shelljs/src/exec.js:214:12)\\n    at Object.exec (/home/sagar/Repositories/Scripts/Projects/node/ubic/ubic/node_modules/shelljs/src/common.js:182:23)\\n    at file:///home/sagar/Repositories/Scripts/Projects/node/ubic/ubic/main.js:34:21\"\", source: /home/sagar/Repositories/Scripts/Projects/node/ubic/ubic/node_modules/shelljs/src/common.js (192)\r\n```\r\n\r\nCan some one please help me out? I just don't understand where Im going wrong. It works fine when I use the asynchronous way. \r\n\r\nEdit : I forgot to mention that Im trying this in nwjs.\r\n\r\nUpdate: Ok I understood that, it works well with nodejs, but for some reason, it doesn't work when using nwjs."},"comment":{"url":"https://api.github.com/repos/shelljs/shelljs/issues/comments/181748575","html_url":"https://github.com/shelljs/shelljs/issues/248#issuecomment-181748575","issue_url":"https://api.github.com/repos/shelljs/shelljs/issues/248","id":181748575,"user":{"login":"nfischer","id":5801521,"avatar_url":"https://avatars.githubusercontent.com/u/5801521?v=3","gravatar_id":"","url":"https://api.github.com/users/nfischer","html_url":"https://github.com/nfischer","followers_url":"https://api.github.com/users/nfischer/followers","following_url":"https://api.github.com/users/nfischer/following{/other_user}","gists_url":"https://api.github.com/users/nfischer/gists{/gist_id}","starred_url":"https://api.github.com/users/nfischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfischer/subscriptions","organizations_url":"https://api.github.com/users/nfischer/orgs","repos_url":"https://api.github.com/users/nfischer/repos","events_url":"https://api.github.com/users/nfischer/events{/privacy}","received_events_url":"https://api.github.com/users/nfischer/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T07:45:06Z","updated_at":"2016-02-09T07:45:06Z","body":"@dvenkatsagar could you test this out again on ShellJS v0.6? If the error persists, we can investigate"}}