-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
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. #4594
Comments
Have the same issue. |
I can't test it right now but downgrading apollo-utilities to 1.0.22 might work. |
Yep, I added apollo-utilities@1.0.22 as a dependency and it works ( for someone who faced the same issue, don't forget to clear node_modules with previous apollo-utilities). |
Likely duplicate of #4506. tl;dr If you can update the |
In case you think this must be an Apollo Client problem and not a TypeScript problem (or an Angular-and-TypeScript) problem, here's the only occurrence of a export function mergeDeep<T extends any[]>(
...sources: T
): TupleToIntersection<T> {
return mergeDeepArray(sources);
} I would love to understand how You can downgrade |
But |
seems typescript not that smart try use: export function mergeDeep<T>(
...sources: T[]
): TupleToIntersection<T[]> {
return mergeDeepArray(sources);
} |
@NateScarlet 's suggestion got me in the right place. I changed T to be an array for line 2. export declare function mergeDeep<T extends any[]>(
...sources: T[]
): TupleToIntersection<T>; |
As mentioned in #4594 (comment), this is not an Apollo Client issue. Thanks! |
we'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:
The text was updated successfully, but these errors were encountered: