Skip to content
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

NPM error: A rest parameter must be of an array type. #342

Closed
stephcmartin opened this issue Jan 31, 2019 · 2 comments
Closed

NPM error: A rest parameter must be of an array type. #342

stephcmartin opened this issue Jan 31, 2019 · 2 comments

Comments

@stephcmartin
Copy link

@stephcmartin stephcmartin commented Jan 31, 2019

Haven't had any issues until last night. Wondering if anyone else is receiving the following error from my npm build:

/home/node/app/node_modules/react-ga/types/index.d.ts
(87,20): A rest parameter must be of an array type.

So I went to look at the the current types in index.d.ts (line87) is currently:
export function ga(...args: any): void;

So I changed it to be an array:
export function ga([...args]: any): void;

Managed to get the build running again without any errors.

Possible for you guys to update this bug?

@jsgervais
Copy link

@jsgervais jsgervais commented Feb 1, 2019

I just had a similar problem, downgrading this package to 2.5.3 fixed my building issue.

edit
multiple arguments to ga() seems to have been intruduced since 2.5.6 with pr #326 and #327
rebuilding with 2.5.6 is fine too

@archiewald
Copy link
Contributor

@archiewald archiewald commented Feb 8, 2019

#343 This fixes the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants