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

Browsersync errors #309

Closed
dgadwa opened this issue Jan 1, 2018 · 13 comments
Closed

Browsersync errors #309

dgadwa opened this issue Jan 1, 2018 · 13 comments

Comments

@dgadwa
Copy link

dgadwa commented Jan 1, 2018

Hey all. I'm encountering an error with Browsersync (via NPM/Gulp) and wondering if someone can shed some light on it. Lines 4 and 7 call attention to "jointswp-sass@5.0.0 browsersync script".

[10:40:23] 'browsersync' errored after 42 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jointswp-sass@5.0.0 browsersync: gulp browsersync
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jointswp-sass@5.0.0 browsersync script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I've tried running “npm i -g gulp-cli” and made sure that dependencies are sorted out and up to date, sadly, to no avail.

dMac-2% node -v
v8.6.0
dMac-2% npm -v
5.6.0

I've successfully built several other projects using Joints but I am at a loss here. Thanks and all the best!

@jackfearing
Copy link

+1 - I got the same issue recently. I ended up grabbing the mode modules folder from another install and using that as a bandaid but definitely not a fix.

@garretthyder
Copy link
Collaborator

Did you run the npm install? I've seen a few cases where you have to purge your node_modules folder and reinstall via npm install

@JeremyEnglert
Copy link
Owner

Can you try running rm -rf node_modules && npm install

@dgadwa
Copy link
Author

dgadwa commented Jan 6, 2018

Thanks for the responses, gang. Here's an outline of the steps I took and the results. Sorry if any of this is obvious - npm, gulp, etc. are still relatively new to my workflow.

1) Ran "rm -rf node_modules && npm install", got "permission denied" errs.
2) Ran it with sudo and got the following output:

iMac-2% sudo rm -rf node_modules && npm install
Password:
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for gulp-plumber

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Dylan/.npm/_logs/2018-01-06T20_34_28_271Z-debug.log

3) Attempted to run browsersync - no dice.

iMac-2% npm run browsersync

jointswp-sass@5.0.0 browsersync /Users/Dylan/Dropbox (éclat.digital)/Local Sites/The Bone Reader/app/public/wp-content/themes/the-bone-reader-5
gulp browsersync

[15:35:20] Local gulp not found in ~/Dropbox (éclat.digital)/Local Sites/The Bone Reader/app/public/wp-content/themes/the-bone-reader-5
[15:35:20] Try running: npm install gulp
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jointswp-sass@5.0.0 browsersync: gulp browsersync
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jointswp-sass@5.0.0 browsersync script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Dylan/.npm/_logs/2018-01-06T20_35_21_000Z-debug.log

4) Then tried to reinstall all of my usual tools and got this:

iMac-2% npm install --save-dev gulp-sass gulp-cssnano gulp-sourcemaps gulp-autoprefixer
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for pinkie-promise

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Dylan/.npm/_logs/2018-01-06T20_50_32_682Z-debug.log
iMac-2%

@dgadwa
Copy link
Author

dgadwa commented Jan 7, 2018

OK, so I ran all of the npm installs individually and browsersync is back up and running. I'm guessing that the "rm -rf node_modules" that Jeremy suggested flushed everything and reinstalling all of the npm stuff brought it back.

However, I've now got what seems to be a different problem.

[Browsersync] Watching files...
[20:19:17] Starting 'styles'...
[20:19:19] assets/styles/scss/style.scss
Error: File to import not found or unreadable: global
Parent style sheet: /Users/Dylan/Dropbox (éclat.digital)/Local Sites/The Bone Reader/app/public/wp-content/themes/the-bone-reader-5/assets/styles/scss/style.scss
on line 70 of assets/styles/scss/style.scss

@import "global";
^

[Browsersync] 2 files changed (login.css.map, login.css)
[20:19:19] Finished 'styles' after 2.02 s

I'd be much obliged if anyone has thoughts on this but I'll hold off posting anything more until Jeremy or other mods decide if this a related issue or if it's a separate matter.

@garretthyder
Copy link
Collaborator

Hi @dgadwa
The error in your last message indicates that the _global.scss file may be missing or unreadable. Is it missing from your '/assets/styles/scss/' folder?

@dgadwa
Copy link
Author

dgadwa commented Jan 8, 2018

Thanks, Garrett. I've verified that my _global.scss file is in the correct folder. The contents of the file seem to be OK and in line with every other project that I've built with Joints.

Knowing that we don't typically make changes to minified files such as assets/styles/scss/style.scss I couldn't help but take a look for the @import "global"; that was also mentioned in the error message. Strangely, I can't find any @global statements at all in there.

Any thoughts?

@garretthyder
Copy link
Collaborator

Very odd, can you package up your assets folder as a zip to post here along with your gulpfile.js and I'll see if anything is amiss.
Is this a clean install of JointsWP SCSS? or are you working from a customized version?
Thanks

@dgadwa
Copy link
Author

dgadwa commented Jan 8, 2018

Yes, this was a clean install. It was running for a short time before the original browsersync errors so I was able to add a little content and styling, but didn't get very far along with it.

Here's a link to the assets and gulpfile: https://drive.google.com/open?id=1WiQq50B4cEsqRZFlIOQJM4L9a2ArHI2P

Cheers!

@garretthyder
Copy link
Collaborator

Hey @dgadwa that link is locked down, can you make it public so I can download the assets. Thanks

@dgadwa
Copy link
Author

dgadwa commented Jan 11, 2018

Sorry Garrett. Should be good to go now.

https://drive.google.com/file/d/1WiQq50B4cEsqRZFlIOQJM4L9a2ArHI2P/view?usp=sharing

@garretthyder
Copy link
Collaborator

Thanks @dgadwa got it here.
Cracking open your assets the issue is you've renamed the _global.scss file to _global.scss.scss (and you have another which I assume is a backup - _global JOSH.scss) so if you just drop the second .scss so that the file is name just _global.scss it should work.
Cheers

@dgadwa dgadwa closed this as completed Jan 30, 2018
@sankarnarayanasahu
Copy link

YError: Invalid first argument. Expected boolean or string but received function.
at argumentTypeError (C:\Users\WELCOME\AppData\Roaming\npm\node_modules\browser-sync\node_modules\yargs\build\lib\argsert.js:64:11)
at C:\Users\WELCOME\AppData\Roaming\npm\node_modules\browser-sync\node_modules\yargs\build\lib\argsert.js:45:17
at Array.forEach ()
at Object.argsert (C:\Users\WELCOME\AppData\Roaming\npm\node_modules\browser-sync\node_modules\yargs\build\lib\argsert.js:38:25)
at Object.version (C:\Users\WELCOME\AppData\Roaming\npm\node_modules\browser-sync\node_modules\yargs\build\lib\yargs.js:796:19)
at runFromCli (C:\Users\WELCOME\AppData\Roaming\npm\node_modules\browser-sync\dist\bin.js:46:10)
at Object. (C:\Users\WELCOME\AppData\Roaming\npm\node_modules\browser-sync\dist\bin.js:38:5)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
[Function]

I am getting this error what to do

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

5 participants