We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to import a plain CommonJS module using require from a tsx REPL.
require
tsx
index.js:
index.js
exports.foo = 123;
❯ tsx Welcome to tsx v3.8.1 (Node.js v16.16.0). Type ".help" for more information. > const foo = require('.') { detail: undefined, id: 'unsupported-require-call', location: { column: 12, file: 'REPL1.js', length: 7, line: 1, lineText: "const foo = require('.')", namespace: '', suggestion: '' }, notes: [], pluginName: '', text: 'Converting "require" to "esm" is currently not supported' } undefined > foo { foo: 123 } >
System: OS: macOS 12.4 CPU: (10) arm64 Apple M1 Pro Memory: 117.00 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn npm: 8.17.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug description
Try to import a plain CommonJS module using
require
from atsx
REPL.Reproduction
index.js
:Environment
Can you contribute a fix?
The text was updated successfully, but these errors were encountered: