You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have some .ts file and try to import it using ESM syntax in the REPL. The variable will be left undefined.
Reproduction
index.ts:
exportdefault"Hello, World!";
❯ tsx
Welcome to tsx v3.6.0 (Node.js v16.15.1).
Type ".help" for more information.
> import hello from './index'
undefined
> hello
Uncaught ReferenceError: hello is not defined
>
Environment
System:
OS: macOS 12.4
CPU: (10) arm64 Apple M1 Pro
Memory: 440.86 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.1/bin/yarn
npm: 8.13.1 - ~/.nvm/versions/node/v16.15.1/bin/npm
tsx is version 3.6.0, envinfo fails to list it for some reason.
Can you contribute a fix?
I’m interested in opening a pull request for this issue.
The text was updated successfully, but these errors were encountered:
Bug description
Have some
.ts
file and try toimport
it using ESM syntax in the REPL. The variable will be left undefined.Reproduction
index.ts
:Environment
Can you contribute a fix?
The text was updated successfully, but these errors were encountered: