Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Bad error message when no path is passed for CSS output #15

Open
tambry opened this issue Jul 9, 2019 · 1 comment
Open

Bad error message when no path is passed for CSS output #15

tambry opened this issue Jul 9, 2019 · 1 comment

Comments

@tambry
Copy link

tambry commented Jul 9, 2019

Using Node 12.6.0:

> npx icomoon-build --css -p .\res\icons.json --fonts dist/
internal/fs/utils.js:426
    throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type boolean
    at Object.openSync (fs.js:439:10)
    at Object.writeFileSync (fs.js:1206:35)
    at <my project root>\node_modules\icomoon-build\lib\cli.js:23:20
    at Array.forEach (<anonymous>)
    at <my project root>\node_modules\icomoon-build\lib\cli.js:17:70
    at <my project root>\node_modules\icomoon-build\lib\icomoon.js:104:9
    at ChildProcess.exithandler (child_process.js:288:7)
    at ChildProcess.emit (events.js:203:13)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
@tambry tambry changed the title Improper use of writeFileSync Invalid path passed to writeFileSync Jul 9, 2019
@tambry tambry changed the title Invalid path passed to writeFileSync Bad error message when no path is passed for CSS output Jul 9, 2019
@tambry
Copy link
Author

tambry commented Jul 9, 2019

Turns out I misread the command line options.

Would be nice if such misusage generated an easy to understand error though. Leaving this open for that.

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

No branches or pull requests

1 participant