Apollo Angular Add--无法读取 tsconfig.base.json
Posted
技术标签:
【中文标题】Apollo Angular Add--无法读取 tsconfig.base.json【英文标题】:Apollo Angular Add-- Couldn't read tsconfig.base.json 【发布时间】:2021-06-14 11:02:21 【问题描述】:英语不是我的母语,请原谅打字错误。 我看了另一个解决方案,修改了版本,但它的执行结果仍然是错误的。 不知道版本更新会不会互相影响。
我运行这段代码
ng add apollo-angular
执行结果如下:
> ng add apollo-angular
Skipping installation: Package already installed
? Url to your GraphQL endpoint
Couldn't read tsconfig.base.json!
我的package.json
"dependencies":
"@angular/animations": "~10.1.4",
"@angular/cdk": "^11.2.2",
"@angular/common": "~10.1.4",
"@angular/compiler": "~10.1.4",
"@angular/core": "~10.1.4",
"@angular/forms": "~10.1.4",
"@angular/material": "^10.2.7",
"@angular/platform-browser": "~10.1.4",
"@angular/platform-browser-dynamic": "~10.1.4",
"@angular/router": "~10.1.4",
"@apollo/client": "^3.3.12",
"apollo-angular": "^2.0.4",
"apollo-angular-link-http": "^1.11.0",
"apollo-cache-inmemory": "^1.6.6",
"apollo-client": "^2.6.10",
"apollo-link": "^1.2.14",
"cors": "^2.8.5",
"graphql": "^15.5.0",
"graphql-modules": "^1.4.1",
"graphql-tag": "^2.11.0",
"jquery": "^3.5.1",
"jsonwebtoken": "^8.5.1",
"jw-paginate": "^1.0.4",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"uuid": "^8.3.2",
"zone.js": "~0.10.2"
,
"devDependencies":
"@angular-devkit/build-angular": "^0.1002.0",
"@angular-devkit/core": "^10.2.2",
"@angular/cli": "~10.1.4",
"@angular/compiler-cli": "~10.1.4",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/jquery": "^3.5.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.0.2"
tsconfig.json
拥有这个数组
"lib": [
"es2018",
"dom",
"esnext.asynciterable"
]
其他人有类似的问题吗?你最后是怎么解决的?
【问题讨论】:
【参考方案1】:似乎这种“解决方案风格的 tsconfig”方法引入了一系列问题,因此他们决定(至少暂时)回滚。
参考:https://docs.google.com/document/d/1eB6cGCG_2ircfS5GzpDC9dBgikeYYcMxghVH5sDESHw/edit
【讨论】:
感谢您的回复!但是我不能降级到Angular9,也许原来的版本是Anuglar10?一开始我没有tsconfig,base,json
以上是关于Apollo Angular Add--无法读取 tsconfig.base.json的主要内容,如果未能解决你的问题,请参考以下文章
Apollo - Angular 应用程序中子组件的多个 graphql 订阅
Angular5 + Three.js无法读取未定义的属性“Scene1”
TypeError:无法读取 Apollo 中未定义的属性“fetchMore”
Apollo - Uncaught (in promise) 错误:网络错误:无法读取未定义的属性“种类”
将对象数组添加到突变 react-graphql-apollo-mongoose 时,“无法读取未定义的属性 'get'”