-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
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
fix: use file url to import tsx at runtime #1171
Conversation
Hey @mdonnalley, thanks for the quick fix! One note, since we're on Windows, in point 5 of the QA steps the tester should change the command in Btw I found out why it wasn't loading the commands from the src folder. I mistakenly removed |
Good catch. I've updated the description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested following the QA steps and it loads tsx correctly now.
QA notes: ✅ macos: still works, can see tsx being registered in debug logs ✅ windows beforecan't load tsx, throws after
Thanks @acerbisgianluca for the double check! |
QA
oclif generate my-cli --yes
tsx
globally:npm install -g tsx
tsx
to my-cli:npm install --save-dev tsx
npm uninstall ts-node
#!/usr/bin/env -S npx tsx --no-warnings
npx tsx
instead ofnode --loader ts-node/esm --no-warnings=ExperimentalWarning
dist
directoryDEBUG=*
bin\dev.cmd hello world
The command should successfully run and the logs should indicate that tsx did not fail to be imported:
It's probably worth repeating these steps on mac or linux too
Fixes #1170
@W-16530475@