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
Describe the bug
If compilerOptions.rootDir and compilerOptions.rootDirs options are omitted, tsPath defaults to dist/ -- even in dev mode.
To Reproduce
npx oclif generate example
Remove rootDir from tsconfig.json
Run ./bin/dev some:command
Expected behavior ./bin/dev should be reading commands from ./src
Workaround
Add compilerOptions.rootDir into tsconfig.json
Environment (please complete the following information):
OS & version: MacOS Ventura 13.4
Shell/terminal & version zsh 5.9
Additional context
Our standard tsconfig.json configuration does not contain a compilerOptions.rootDir value. Instead, we have been relying on compilerOptions.baseUrl and compilerOptions.sourceRoot settings.
Until we realized what was going on with the rootDir, the developer experience was quite confusing -- we were definitely running in dev mode, but somehow the commands were loaded from ./dist. There were no warning messages either, so it wasn't all that intuitive to figure out what was going wrong.
Perhaps you could add some kind of a tsconfig.json sanity check to make sure that the fields you require to be present are present?
The text was updated successfully, but these errors were encountered:
Describe the bug
If
compilerOptions.rootDir
andcompilerOptions.rootDirs
options are omitted, tsPath defaults todist/
-- even in dev mode.To Reproduce
npx oclif generate example
rootDir
fromtsconfig.json
./bin/dev some:command
Expected behavior
./bin/dev
should be reading commands from./src
Workaround
Add
compilerOptions.rootDir
intotsconfig.json
Environment (please complete the following information):
Additional context
Our standard
tsconfig.json
configuration does not contain acompilerOptions.rootDir
value. Instead, we have been relying oncompilerOptions.baseUrl
andcompilerOptions.sourceRoot
settings.Until we realized what was going on with the
rootDir
, the developer experience was quite confusing -- we were definitely running indev
mode, but somehow the commands were loaded from./dist
. There were no warning messages either, so it wasn't all that intuitive to figure out what was going wrong.Perhaps you could add some kind of a
tsconfig.json
sanity check to make sure that the fields you require to be present are present?The text was updated successfully, but these errors were encountered: