Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

rootDir for Custom components

Venkata Rahul SMar 25 2022

My application has a set of common typescript classes in a directory (and its sub-directories) named fwk.
I am also creating custom components, which at build time are translating into a versioned directory structure. For example, one such component is an AuthProcessor component. This component is directly under my jet-composites (created by the ojet create component command). The AuthProcessor uses the configuration taken from classes declated in the fwk/common/configuration. To tell the typescript compiler, I edited the tsconfig.json and added
"fwk/*": [
"src/ts/fwk/*"
]
to the paths section.
Now there are at least two points I am not clear about. First and more serious is the runtime compilation issue, which results in a Typescript Error: fwk/common/configuration/CustomConfiguration.ts is not under rootDir (web/ts/jet-composites). This error is during the actual service. So something is going wrong at runtime, leading to the files not getting loaded and hence the component remaining incomplete (oj-incomplete), post rendering.
What is curious is that the rootDir for composite components is being treated as web/ts/jet-composites rather than the src/ts, as mentioned in the tsconfig.json. So there is something about jet-composites that I am missing.
Second, how accurate are VS Code imports intellisense suggestions? In other words, if I take the VS Code not showing compilation issues as a baseline, will my build process go through? Even if it does, I have the more serious first problem.
A related issue seems to be mentioned here. But I cannot find the loop snippet described by the author of that post.
Any ideas?

This post has been answered by Duncan Mills-Oracle on Apr 4 2022
Jump to Answer
Comments
Post Details
Added on Mar 25 2022
7 comments
582 views