Skip to content
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

@oclif/core 2.x ts-node is not register in local #1223

Open
kerm1it opened this issue Oct 16, 2024 · 1 comment
Open

@oclif/core 2.x ts-node is not register in local #1223

kerm1it opened this issue Oct 16, 2024 · 1 comment
Labels
wontfix This will not be worked on

Comments

@kerm1it
Copy link

kerm1it commented Oct 16, 2024

I used version 1.x before, and now I have updated to version 2.x (we also need to support node 16, so we can't update to the latest version)

In version 1.x, I can directly modify src/commands/a.ts to take effect directly, but in 2.x, I need to execute build first before it can take effect

After investigation, I found that:

In version 1.x, the file in src/commands is automatically read in the local development environment

In version 2.x, the file in lib/commands is read

I use yarn link locally to link the command to the global environment, hoping that the files under src can be automatically read when developing locally.

@mdonnalley
Copy link
Contributor

@kerm1it being that v2 is 2 majors behind there's not much I can do to resolve the issue. But I do have a couple of suggestions

  • Enable the DEBUG=* environment variable. The logs for the ts-node logic are much better in the latest major but there still might be some helpful information there about what oclif/core is attempting to do with ts-node
  • Do you have ts-node list as a dev dependency in your project?
  • Is your plugin ESM? If so, auto-compilation won't work

@mdonnalley mdonnalley added the wontfix This will not be worked on label Oct 16, 2024
@mdonnalley mdonnalley transferred this issue from oclif/oclif Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants