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

cannot read project file 'tsconfig.json' with 'references' to sub config files. #257

Closed
Nick-Hopps opened this issue Nov 28, 2023 · 1 comment

Comments

@Nick-Hopps
Copy link

Nick-Hopps commented Nov 28, 2023

my tsconfig.json file is like this:

{
  "files": [],
  "references": [
    {
      "path": "./tsconfig.node.json"
    },
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.vitest.json"
    }
  ]
}

and I have different settings based on different files, such as tsconfig.app.json:

{
  "extends": "@vue/tsconfig/tsconfig.dom.json",
  "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
  "exclude": ["src/**/__tests__/*"],
  "compilerOptions": {
    "baseUrl": ".",
    "composite": true,
    "paths": {
      "@/*": ["./src/*"]
    },
    "types": ["element-plus/global.d.ts"]
  }
}

I have to configure tsconfig file specifically with 'path' in em to make it work:

{
  'import/parsers': {
    '@typescript-eslint/parser': ['.ts', '.tsx'],
  },
  'import/resolver': {
    'typescript': {
      'project': './tsconfig.app.json',
    },
  },
}
@JounQin
Copy link
Collaborator

JounQin commented Nov 28, 2023

Duplicate of #94

@JounQin JounQin marked this as a duplicate of #94 Nov 28, 2023
@JounQin JounQin closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants