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?
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.
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)
node_modules
? Default User Setting includes
"files.watcherExclude": {..."**/node_modules/**": true}
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!
Most helpful comment
In VS Code, If you are getting the error after package install or setting changes, just reload your workspace or folder.