Skip to content
Discussion options

You must be logged in to vote

Hi @daogrady,

You are right in a new empty project with cds init <name> --add typescript it works fine.

The culprit is in the tsconfig.json include:

{
  ...
  ,"include": ["srv/**/*.ts"]
}

This was added to actually ignore other typescript files in the project setup, for example the utility scripts in the project root and the unit tests in test/.

I recon this is inferring the rootDir to switch from . to srv/. Which is by default not part of the tsconfig.json file in the barebone project.

After adding rootDir to the tsconfig.json it works fine;

{
  "compilerOptions": {
    ...
    ,"rootDir": "."
    ...
  }
}

Sorry for the inconvenience.
Dennis

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dvvelzen
Comment options

Answer selected by daogrady
@daogrady
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants