building client errors: ERROR in node_modules/apollo-utilities/lib/util/mergeDeep.d.ts(2,52): error TS2370: A rest parameter must be of an array type.
See original GitHub issuewe’re trying to build our angular app in docker but apollo errors: ERROR in node_modules/apollo-utilities/lib/util/mergeDeep.d.ts(2,52): error TS2370: A rest parameter must be of an array type. we’ve already updated all our dependencies to the latest version to try and fix this but no luck. Any ideas would be most welcome.
Intended outcome:
building the client in docker
Actual outcome:
ERROR in node_modules/apollo-utilities/lib/util/mergeDeep.d.ts(2,52): error TS2370: A rest parameter must be of an array type.
Versions
System: OS: macOS Sierra 10.12.6 Binaries: Node: 8.11.3 - /usr/local/bin/node Yarn: 1.9.4 - /usr/local/bin/yarn npm: 6.5.0 - /usr/local/bin/npm Browsers: Chrome: 72.0.3626.121 Firefox: 65.0.1 Safari: 12.0.3
package.json:
{
"name": "client",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --port 4200 --host 0.0.0.0 --poll 500 --proxy-config proxy.config.json",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"update:schema": "apollo schema:download --endpoint http://0.0.0.0:8000/graphql ./src/app/graphql/schema.json",
"update:types": "apollo codegen:generate --schema ./src/app/graphql/schema.json --target=typescript"
},
"apollo": {
"schemas": {
"api": {
"schema": "src/app/graphql/schema.graphql",
"endpoint": "http://0.0.0.0:8000/graphql"
}
},
"queries": [
{
"schema": "api",
"includes": [
"**/*.ts"
],
"excludes": [ "node_modules/**"
]
}
]
},
"private": true,
"dependencies": {
"@angular/animations": "^7.2.9",
"@angular/cdk": "^7.3.4",
"@angular/common": "^7.2.9",
"@angular/compiler": "^7.2.9",
"@angular/core": "^7.2.9",
"@angular/flex-layout": "6.0.0-beta.18",
"@angular/forms": "^7.2.9",
"@angular/http": "^7.2.9",
"@angular/material": "^7.3.4",
"@angular/platform-browser": "^7.2.9",
"@angular/platform-browser-dynamic": "^7.2.9",
"@angular/router": "^7.2.9",
"apollo-angular": "^1.5.0",
"core-js": "^2.6.5",
"rxjs": "^6.4.0",
"zone.js": "~0.8.29",
"apollo-angular-link-http": "^1.5.0",
"apollo-link": "^1.2.11",
"apollo-client": "^2.5.1",
"apollo-cache-inmemory": "^1.5.1",
"graphql-tag": "^2.10.1",
"graphql": "^14.1.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.6",
"@angular/cli": "~7.3.6",
"@angular/compiler-cli": "^7.2.9",
"@angular/language-service": "^7.2.9",
"@types/jasmine": "~3.3.10",
"@types/jasminewd2": "~2.0.6",
"@types/node": "~11.11.3",
"codelyzer": "~4.5.0",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.5",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.2",
"ts-node": "~8.0.3",
"tsc-watch": "^2.1.2",
"tslint": "~5.14.0",
"typescript": "^3.3.3333"
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:10 (4 by maintainers)
Top GitHub Comments
I can’t test it right now but downgrading apollo-utilities to 1.0.22 might work. let me know how it goes if you give it a try.
Likely duplicate of https://github.com/apollographql/apollo-client/issues/4506.
tl;dr If you can update the
typescript
package to at least 3.0, this error should go away, per https://github.com/apollographql/apollo-client/issues/4501#issuecomment-468001034. Since the original poster seems to be usingtypescript@3.3.3333
, I would ask that they double-check there are no other copies of thetypescript
package in use.