Browsersync no longer works - node.js

I'm learning Laravel in combination with Vue and I installed Browsersync to make the process smoother. When I first installed it worked flawlessly.
My setup is the following:
Browsersync installed locally with npm i browser-sync --save-dev
Project location: C:\WEB\project_folder\
php -S localhost:8000 -t public to serve the app. If I go to localhost:8000 it works as expected
added mix.browserSync({proxy: 'localhost:8000', browser: "C:\\Program Files (x86)\\Google\\Chrome Beta\\Application\\chrome.exe", notify: false}); in webpack.mix.js
npm run watch to build and run Browsersync
Strange thing is that the Browsersync UI works properly if I acces localhost:3001, even from another device in the network.
I observed it wasn't working anymore while creating another project where I use Parcel for bundling instead of webpack/laravel-mix. There I use the Browsersync CLI, running .\node_modules\.bin\browser-sync start --proxy localhost:8000 --no-notify --cwd 'C:\WEB\project_folder' -f 'public'
I did not update Node, npm or the OS in the meantime. The only thing I installed is the game Valorant which has some fancy anti cheat service that is installed, but I disabled that service.
I tried:
multiple browsers and devices
switching the order in which I start the server and Browsersync
the development folder was on another partition and I recently moved it to C: so I tried moving the project in the previous location
thinking really hard about the meaning of life :)
I guess next time I will use Docker to have a isolated environment.
I'm stumped. Any ideas? Have anyone encountered and solved this?

This was possibly caused by Windows. I've installed kb4571744 and everything works again.

Related

Node Modules Not Being Found in Electron App

I am in progress of making a simple Electron app. When I boot the app from the console on my Win10 PC (using the classic npm i && npm start), it boots the modules and works like a charm. When I bring it to an iMac running High Sierra for testing for its deployment, it crashes when I try to use the app with the error of Cannot find module {insert module here}. I've tried clearing the cache (recommended here), but it has been to no avail. I have my package.json, index.js, and downloader.js all linked below for ease.
Edit: Sorry for not linking before! The repo is here (it's pretty easy to find the package.json and index.js, the downloader.js is in the js/)
I'm open to any and all help! Thanks in advance for, like I said, any and all help!

Laravel vue js npm run watch works only one time

I'm developing laravel vue project.And i am using homestead for development. when i run
npm run watch
it only executes once and not executing when i do changes on my code and refresh the browser.
I tried --watch--poll also. but works only once.
Is there any commands that i can use to automatically compile the code each time when i make changes to the code or any solutions for this matter?
Found out the issue. need to run it outside the homestead environment.

Laravel-mix used in project, everything builds, but in browser it doesn't work

I have a project from other developer and I try to add to it few components. But I still cannot run it.
I've installed all dependences using yarn install, than I've executed npm run dev and when I execute npm run hot, there aren't any error in console on my localhost:8081, I see clear white screen.
Can you help me please, give me an idea where to look for a problem? Thank you.
It was amazing stupid error. I have XAMPP installed on my PC and Tomcat works on port 8080, so npm run hot started server on 8081, but additional javascripts was loaded from 8080. ...
It wasn't only one reason, I don't remember how it becames to show me those js-files. First, they wasn't called from script any time.

Issues running React app on Windows environement

I have a working react app that I had hosted on a linux environment, but the client has switched their hosting provider and now I have to run the app on a Windows environment. I personally am unfamiliar with Windows and having some serious issues getting my app to work now.
After loads of debugging and testing I now can get my app to run, but when I start it, it will throw some errors which will results in a broken app in the browser.
So when I run npm start it will start up the app and spit out this error:
Screenshot of the terminal error 1/2
Screenshot of the terminal error 2/2
It seems to spit out some complaints when using npm run watchJS which runs this command babel src --watch --out-dir lib.
I am completely lost at this point and have no idea where to go from here.
I can provide as much detail as anyone needs after looking at the question, I just don't know what else to add to this issue and don't want to fill up this question with irrelevant info.
Thanks in advance for any help
It is likely a bug with the version of npm you are using.
See this thread:
https://github.com/npm/npm/issues/18380
Try rolling back your version of npm to 5.3
The issue appears to be exclusive to windows with babel packages.

heroku running gulp build

i am trying to install a node app onto heroku. My application requires both gulp build and gulp install to be called on the server upon instillation, however i am having troubles doing this.
I have tried writing this inside of the package.json:
"scripts":"gulp build && gulp install"
which works at first, but after about an hour the server must restart and recall the script causing for the contents of the server to be rebuilt. this removes all of my content such as newly written blogs or changes.
I have also tried using the heroku toolbelt
heroku run gulp build
heroku run gulp install
However, even though it produces the correct console write lines and looks asif it has made the necessary changes, it hasn't, the server produces an error which proves that the resources haven't been built meaning that the console command didnt make any changes to the actual server files.
Am i missing something out here? Thanks in advance.
So i have figured out that the problem lies with the fact that i have tried to use a LevelDB database on heroku. Apparently, heroku uses no-writable dynos, meaning that the levelDB database is unable to save.

Resources