{"action":"created","issue":{"url":"https://api.github.com/repos/HerringtonDarkholme/typescript-repl/issues/37","repository_url":"https://api.github.com/repos/HerringtonDarkholme/typescript-repl","labels_url":"https://api.github.com/repos/HerringtonDarkholme/typescript-repl/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/HerringtonDarkholme/typescript-repl/issues/37/comments","events_url":"https://api.github.com/repos/HerringtonDarkholme/typescript-repl/issues/37/events","html_url":"https://github.com/HerringtonDarkholme/typescript-repl/issues/37","id":438440673,"node_id":"MDU6SXNzdWU0Mzg0NDA2NzM=","number":37,"title":"exports is not defined","user":{"login":"perplexes","id":13812,"node_id":"MDQ6VXNlcjEzODEy","avatar_url":"https://avatars0.githubusercontent.com/u/13812?v=4","gravatar_id":"","url":"https://api.github.com/users/perplexes","html_url":"https://github.com/perplexes","followers_url":"https://api.github.com/users/perplexes/followers","following_url":"https://api.github.com/users/perplexes/following{/other_user}","gists_url":"https://api.github.com/users/perplexes/gists{/gist_id}","starred_url":"https://api.github.com/users/perplexes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perplexes/subscriptions","organizations_url":"https://api.github.com/users/perplexes/orgs","repos_url":"https://api.github.com/users/perplexes/repos","events_url":"https://api.github.com/users/perplexes/events{/privacy}","received_events_url":"https://api.github.com/users/perplexes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-04-29T18:10:39Z","updated_at":"2019-06-28T20:59:03Z","closed_at":null,"author_association":"NONE","body":"```typescript\r\n// export_default.ts\r\nexport async function process(filename: string): Promise<any> {\r\n  return {};\r\n}\r\n\r\nexport default process;\r\n```\r\n\r\n```bash\r\n$ npm list tsun\r\n└── tsun@0.5.0\r\n$ node_modules/.bin/tsun\r\nTSUN : TypeScript Upgraded Node\r\ntype in TypeScript expression to evaluate\r\ntype :help for commands in repl\r\n\r\n> import p from 'export_default';\r\nReferenceError: exports is not defined\r\n    at evalmachine.<anonymous>:3:23\r\n    at ContextifyScript.Script.runInContext (vm.js:35:29)\r\n    at Object.runInContext (vm.js:89:6)\r\n    at startEvaluate (node_modules/tsun/bin/src/repl.js:147:25)\r\n    at replLoop (node_modules/tsun/bin/src/repl.js:173:9)\r\n    at node_modules/tsun/bin/src/repl.js:311:9\r\n    at Interface._onLine (readline.js:231:5)\r\n    at Interface._line (readline.js:585:8)\r\n    at Interface._ttyWrite (readline.js:862:14)\r\n    at ReadStream.onkeypress (readline.js:120:10)\r\n```"},"comment":{"url":"https://api.github.com/repos/HerringtonDarkholme/typescript-repl/issues/comments/506874986","html_url":"https://github.com/HerringtonDarkholme/typescript-repl/issues/37#issuecomment-506874986","issue_url":"https://api.github.com/repos/HerringtonDarkholme/typescript-repl/issues/37","id":506874986,"node_id":"MDEyOklzc3VlQ29tbWVudDUwNjg3NDk4Ng==","user":{"login":"sdegutis","id":4399718,"node_id":"MDQ6VXNlcjQzOTk3MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/4399718?v=4","gravatar_id":"","url":"https://api.github.com/users/sdegutis","html_url":"https://github.com/sdegutis","followers_url":"https://api.github.com/users/sdegutis/followers","following_url":"https://api.github.com/users/sdegutis/following{/other_user}","gists_url":"https://api.github.com/users/sdegutis/gists{/gist_id}","starred_url":"https://api.github.com/users/sdegutis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdegutis/subscriptions","organizations_url":"https://api.github.com/users/sdegutis/orgs","repos_url":"https://api.github.com/users/sdegutis/repos","events_url":"https://api.github.com/users/sdegutis/events{/privacy}","received_events_url":"https://api.github.com/users/sdegutis/received_events","type":"User","site_admin":false},"created_at":"2019-06-28T20:59:03Z","updated_at":"2019-06-28T20:59:03Z","author_association":"NONE","body":"Having the same error here:\r\n\r\n```\r\n$ tsun\r\nTSUN : TypeScript Upgraded Node\r\ntype in TypeScript expression to evaluate\r\ntype :help for commands in repl\r\n\r\n> import fs from 'fs'\r\nevalmachine.<anonymous>:3\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n                      ^\r\n\r\nReferenceError: exports is not defined\r\n    at evalmachine.<anonymous>:3:23\r\n    at Script.runInContext (vm.js:135:20)\r\n    at Object.runInContext (vm.js:298:6)\r\n    at startEvaluate (/usr/local/lib/node_modules/tsun/bin/src/repl.js:147:25)\r\n    at replLoop (/usr/local/lib/node_modules/tsun/bin/src/repl.js:173:9)\r\n    at /usr/local/lib/node_modules/tsun/bin/src/repl.js:311:9\r\n    at Interface._onLine (readline.js:305:5)\r\n    at Interface._line (readline.js:680:8)\r\n    at Interface._ttyWrite (readline.js:960:14)\r\n    at ReadStream.onkeypress (readline.js:183:10)\r\n> \r\n```"}}
{"actor":{"display_login":"sdegutis"}}