oclif / core

Node.js Open CLI Framework. Built by Salesforce.
https://oclif.io
MIT License
208 stars 70 forks source link

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

Closed kerm1it closed 1 month ago

kerm1it commented 1 month ago

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 commented 1 month ago

@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