Tagged: tsconfig rootDirs
- This topic has 4 replies, 2 voices, and was last updated 7 years, 6 months ago by John.
-
AuthorPosts
-
JohnParticipantis there a way to have the IDE support the tsconfig outDirs option?
I have shared code in another project that I’m referencing through this mechanism and I get the error ‘Cannot find module …’ on my import statement in the IDE. But if I use tsc from the command line the code compiles OK.
Thanks,
support-piotrParticipantJohn,
Thank you for your report. Could you please provide us a sample project set, which exposes your issue? It’s possible that you are hitting problem with multi-project support. We have that on our timeline for the next release, however it would be good to ensure that we are correctly handling your project.
Best regards,
Piotr Tomiak
JohnParticipantI’m sorry I misstated the tsconfig option; it’s actually rootDirs instead of outDirs.
I’ve attached a sample project that shows the problem. There are 2 projects in the rootDirsExample folder. I want to import the Station class in the hub project into the app.ts file in the spoke project. When I run tsc from the command line on the spoke project it runs successfully. If I then copy the dist\hub\src\models folder into the spoke\dist folder and then run node dist/app.js, the message, “You have arrived at the station” from the Station class in the hub project is successfully displayed.What I would like is if my webclipse was able to resolve the reference to ./models/Station in the spoke/app.js file the same way the tsc command does.
Thanks
Attachments:
You must be logged in to view attached files.
support-piotrParticipantJohn,
Thank you for your example project. As I suspected you’re running into a known issue with connecting two projects. We have that on our timeline as high priority issue and I hope I’ll be able to do something about this for the next release. I am sorry, but I unfortunately don’t have any workaround for you now.
Best regards,
Piotrek
JohnParticipantThanks for the response. At least with that, I know to look for another solution
-
AuthorPosts