svenheden / csharp-models-to-typescript

C# models to TypeScript
88 stars 58 forks source link

I'm getting 'Error: EISDIR: illegal operation on a directory' #40

Closed omneimneh closed 4 years ago

omneimneh commented 4 years ago

Error upon running: csharp-models-to-typescript --config=csharp.config.json

{ [Error: EISDIR: illegal operation on a directory, open '<Dir>\src\models\input']
  errno: -4068,
  code: 'EISDIR',
  syscall: 'open',
  path: '<Dir>\\src\\models\\input' }

csharp.config.json

{
    "include": [
        "../<Dir>/InputModels/**/*.cs"
    ],
    "exclude": [],
    "namespace": "Api",
    "output": "./src/models/input",
    "camelCase": false,
    "camelCaseEnums": false,
    "numericEnums": false,
    "stringLiteralTypesInsteadOfEnums": false,
    "customTypeTranslations": {}
}

I also tried running this command as administrator in case something is wrong with the file permissions and gave everyone full control to this folder and I'm still getting the same error.

issue

omneimneh commented 4 years ago

I just figured the output should be a file not a directory. Is there any option to output one file per .cs file?

svenheden commented 4 years ago

Unfortunately not @omneimneh