Skip to content

ReferenceError: exports is not defined (OSX) #437

@ethanresnick

Description

@ethanresnick

The issue originally reported in #309 (or one very related to it) is back, possibly caused by the changes in #404.

Specifically:

$ ts-node
> export default 4;

[eval].ts:2
Object.defineProperty(exports, "__esModule", { value: true });
                      ^

ReferenceError: exports is not defined
    at [eval].ts:2:23
    at ContextifyScript.Script.runInContext (vm.js:53:29)
    at ContextifyScript.Script.runInNewContext (vm.js:59:15)
    at _eval (/usr/local/lib/node_modules/ts-node/dist/_bin.js:181:29)
    at REPLServer.replEval (/usr/local/lib/node_modules/ts-node/dist/_bin.js:220:18)
    at bound (domain.js:301:14)
    at REPLServer.runBound [as eval] (domain.js:314:12)
    at REPLServer.onLine (repl.js:433:10)
    at emitOne (events.js:115:13)
    at REPLServer.emit (events.js:210:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions