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

TypeError when calling 'toIco()' #18

Closed
GarkGarcia opened this issue Jan 3, 2019 · 1 comment
Closed

TypeError when calling 'toIco()' #18

GarkGarcia opened this issue Jan 3, 2019 · 1 comment

Comments

@GarkGarcia
Copy link

I'm getting the following error when calling toIco(arr: string[])...

TypeError: Expected a buffer
    at module.exports (path\node_modules\parse-png\index.js:6:25)
    at Promise.all.data.map.x (path\node_modules\to-ico\index.js:90:35)
    at Array.map (<anonymous>)
    at generateIco (path\node_modules\to-ico\index.js:90:26)
    at module.exports (path\node_modules\to-ico\index.js:146:9)

Am I doing something wrong?

@GarkGarcia
Copy link
Author

I figured it out. The problem is toIco() takes a Buffer[] as an argument, but the documentation says it takes a string[]:

toIco(input, [options])

input
Type: Array string

I believe the docs should say something like the following:

toIco(input, [options])

input
Type: Array<Buffer>

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

1 participant