Apollo-client: ../../tsconfig.base does not exist

Created on 27 Apr 2018  ·  12Comments  ·  Source: apollographql/apollo-client

there is a tsconfig.json file in apollo-cache dependency, which looks like this:

{
  "extends": "../../tsconfig.base",
  "compilerOptions": {
    "rootDir": "./src",
    "outDir": "lib",
    "lib": ["es6", "dom", "es2017.object"]
  },
  "include": ["src/**/*.ts"],
  "exclude": ["src/**/__tests__/*.ts"]
}

But tsconfig.base does not exist in my project. So What tsconfig.base should be?

good-first-issue ✔ confirmed 🐞 bug 🙏 help-wanted

Most helpful comment

In VS Code, If you are getting the error after package install or setting changes, just reload your workspace or folder.

All 12 comments

Having the same issue here from apollo-cache-inmemory

"../../tsconfig.base" points to the tsconfig.base.json file in the root of the apollo-client project (the .json extension is optional when using extends). Thanks!

@hwillson That much is clear, but the actual file does not exist when the library is included inside node_modules/

Thanks for the clarification @Slessi. The file isn't included when bundling intentionally. Is this causing a problem somewhere/somehow?

@hwillson to be honest for a while VS Code kept annoyingly pointing it out to me as an error but now that I want to show it to you, it seems to not care anymore ¯\_(ツ)_/¯

Same issue here, attached a screenshot. Prevented it from showing up by adding file excludes in VSCode.

tsconfig base does not exist-vscode

how can we overcome this error.Please do provide your solutions or suggestions

Same issue with multiple apollo packages

apollo-link-context, apollo-link-error, apollo-link-http and apollo-link-http-common

Yeah, same here (apollo-cache-inmemory v1.2.4)

  1. Seems odd that this module is extending a userland file.
  2. Is everyone here using VS Code? (I am v1.24.1). Why is VS Code error checking node_modules? Default User Setting includes
    "files.watcherExclude": {..."**/node_modules/**": true}
    , is this a VS Code bug?
  3. I silenced the error by creating the expected tsconfig.base in my project root. I placed an empty pair of braces in that file {}

In VS Code, If you are getting the error after package install or setting changes, just reload your workspace or folder.

Same Error Here:

    "apollo-cache-inmemory": "^1.2.6",
    "apollo-client": "^2.3.7",
    "apollo-link": "^1.2.2",
    "apollo-link-context": "^1.0.8",
    "apollo-link-error": "^1.1.0",
    "apollo-link-http": "^1.5.4",
    "apollo-link-state": "^0.4.1",
    "apollo-upload-client": "^8.1.0",
    "typescript": "^3.0.1"

Let's just get the tsconfig.json's out of those published packages altogether. They shouldn't be there. https://github.com/apollographql/apollo-client/pull/3828 will address this. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nlko picture nlko  ·  3Comments

stubailo picture stubailo  ·  3Comments

MichaelDeBoey picture MichaelDeBoey  ·  3Comments

gregorskii picture gregorskii  ·  3Comments

canercandan picture canercandan  ·  3Comments