[2.26.10] YError: Invalid first argument. Expected boolean or string but received function.
See original GitHub issueIssue details
Getting the version or just running browser-sync outputs this error:
# browser-sync --version
YError: Invalid first argument. Expected boolean or string but received function.
at argumentTypeError (/usr/lib/node_modules/browser-sync/node_modules/yargs/build/lib/argsert.js:64:11)
at /usr/lib/node_modules/browser-sync/node_modules/yargs/build/lib/argsert.js:45:17
at Array.forEach (<anonymous>)
at Object.argsert (/usr/lib/node_modules/browser-sync/node_modules/yargs/build/lib/argsert.js:38:25)
at Object.version (/usr/lib/node_modules/browser-sync/node_modules/yargs/build/lib/yargs.js:796:19)
at runFromCli (/usr/lib/node_modules/browser-sync/dist/bin.js:46:10)
at Object.<anonymous> (/usr/lib/node_modules/browser-sync/dist/bin.js:38:5)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
[Function]
It doesn’t produce an exit code so my Travis-CI builds continued to push it to my repos and breaks my stack’s updater. Very bad.
Build log: https://travis-ci.org/github/demyxco/browsersync/builds/709580148
Steps to reproduce/test case
- npm -g install browser-sync
- browser-sync --version
Please specify which version of Browsersync, node and npm you’re running
- Browsersync [ 2.26.10 ]
- Node [ v12.15.0 ]
- Npm [ 6.13.4 ]
Affected platforms
- [ ✅ ] linux
- windows
- OS X
- freebsd
- solaris
- other (please specify which)
Browsersync use-case
- API
- Gulp
- Grunt
- [ ✅ ] CLI
If CLI, please paste the entire command below
No issues, works fine even with that exit 0 error.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:19 (1 by maintainers)
Top Results From Across the Web
My node server doesn't load the page using browsersync as a ...
Indeed, I receive the the msg from nodemon that the server is running, and from browser-sync that it is proxing my server, as...
Read more >correctly downloaded node.js but still unable to install browser-sync ...
... in cmd it shows something like this error :YError: Invalid first argument. Expected boolean or string but received function. at argumentTypeError ...
Read more >HAProxy 1.5 changelog
BUG/MINOR: tcpcheck: conf parsing error when no port configured on server and last rule is a CONNECT with no port - BUG/MINOR: tcpcheck:...
Read more >rollup changelog
Fix a situation where invalid code was rendered when dynamically importing a module with synthetic named exports when preserving modules (#3738) ...
Read more >CoffeeScript
-s, --stdio, Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT. ... boolean: if true, output without the top-level function safety...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You all will have to downgrade since 2.26.9 is affected as well.
Hi all, fixed as of browser-sync@2.26.12 😃