Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolveJsonModule issue -> error TS5055: Cannot write file '/Users/Me/Project/en-AU.json' because it would overwrite input file. #24743

Closed
jpike88 opened this issue Jun 7, 2018 · 0 comments
Labels
Duplicate An existing issue was already created

Comments

@jpike88
Copy link

jpike88 commented Jun 7, 2018

TypeScript Version: 2.9.1

Search Terms: resolveJsonModule TS5055

Code

Getting error:

error TS5055: Cannot write file '/Users/Me/Project/en-AU.json' because it would overwrite input file.

{
  "compileOnSave": true,
  "compilerOptions": {
    "moduleResolution": "node",
    "target": "ESNext",
    "noEmitHelpers": true,
    "lib": [
      "esnext", "dom"
    ],
    "sourceMap": true,
    "allowSyntheticDefaultImports": true,
    "noUnusedLocals": true,
    "resolveJsonModule": true,
    "noUnusedParameters": true,
    "skipLibCheck":true
  }
}

Expected behavior:
The recent version of VSCode (includes TS 2.9.1) seems to play fine, signalling no warning on an imported JSON file.

Actual behavior:
When running tsc, I get this error:

error TS5055: Cannot write file '/Users/Me/Project/en-AU.json' because it would overwrite input file.

I tried adding "exclude" and "include" instructions to tsconfig.json, it didn't fix it.

@jpike88 jpike88 changed the title error TS5055: Cannot write file '/Users/Me/Project/en-AU.json' because it would overwrite input file. resolveJsonModule issue -> error TS5055: Cannot write file '/Users/Me/Project/en-AU.json' because it would overwrite input file. Jun 7, 2018
@jpike88 jpike88 closed this as completed Jun 7, 2018
@mhegazy mhegazy added the Duplicate An existing issue was already created label Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants