Error When Running BrowserSync from Package.json Scripts
There was an issue opened in the repo here: https://github.com/BrowserSync/browser-sync/issues/1782
Looks like a downgrade might be a workaround until the team addresses the issue. npm -g install browser-sync@2.26.7
. I just confirmed this does remove the warning.
Also noted there that this is not an error, but a warning, so the package will work as expected, but console output will be muddied.
I installed browser-sync, via sudo npm install -g browser-sync
on my linux machine and i get the exact same error.
Node version:
~$ node -vv10.13.0
Npm version:
~$ npm -v6.4.1
Then i run browser-sync --version
to get:
YError: Invalid first argument. Expected boolean or string but received function. at argumentTypeError (/usr/local/lib/node_modules/browser-sync/node_modules/yargs/build/lib/argsert.js:64:11) at parsed.optional.forEach (/usr/local/lib/node_modules/browser-sync/node_modules/yargs/build/lib/argsert.js:45:17) at Array.forEach (<anonymous>) at Object.argsert (/usr/local/lib/node_modules/browser-sync/node_modules/yargs/build/lib/argsert.js:38:25) at Object.version (/usr/local/lib/node_modules/browser-sync/node_modules/yargs/build/lib/yargs.js:796:19) at runFromCli (/usr/local/lib/node_modules/browser-sync/dist/bin.js:46:10) at Object.<anonymous> (/usr/local/lib/node_modules/browser-sync/dist/bin.js:38:5) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32)[Function]
Although i am beginner with npm, it does not seem to be a permissions issue
I'm having the same error on windows, I tried as per documentation installing visual studio to fix some c+ problem and reinstalled and it keeps appearing the same error, when I install globally it works'ish but if I install on a single project it does not even recognize browser-sync version prompt, I tried updating npm and node, and the problem remain, but I notice that when I install things like node-sass I'm having the same issue which were not there before, so I'm guessing the problem has to do with some global configuration of npm, I reinstalled it and still nothing, so something else must be conflicting it, today I was gonna try yarn, and see what happens.
what do you get when you prompt npm list --depth 0
https://gist.github.com/soyrbto/5bc81049780baab3f3c4211c0b7548bd
this is happening to me, I want to check that we have the same problem