why 'npm run watch' not working correctly? - laravel

I have weird problem :
I am working on Laravel/Vue project and when I run npm run watch it run correctly and it do compile stuff when i save. the problem is after ~3min when i save it do run as it did compile stuff but nothing changed on the browser.
The solution found is that i have to run npm run watch or npm run dev every time.
does anybody have a solution for that ?
hope you can help.

Related

Error executing "npm run test" with cypress

I'm learning cypress, but I came across this error.
When running npm run test the cypress window open for a while, but a couple seconds later it close, then this error appears:
I already installed the lastest cypress version and it didn't work.
Try running cypress cache clear and then npm install cypress --save-dev again.
then try running it with ./node_modules/.bin/cypress open.
Can you try these steps:
Delete node_modules folder
Run npm install -D cypress
Run npx cypress open
SOLVED: The problem was admin permission. When the blank window opened for a while, I clicked on the windows and authorized it again as adm. It worked!
I had authorized as adm before, but I don't know why it was happening.
Thanks you all guys for trying to help me.

Error on Laravel after installing VueJS. Request failed with status 404

I am developing a small system with Laravel Framework 5.6.39 and everything was going well, until I installed Vue Js. When viewing in the browser, what should be displayed does not appear and the following appears in the console:
How can I solve this error?
I think you need to run:
npm run watch
After adding VueJS to your project you need to install all dependencies by executing:
npm install
Then you can either compile your assets onetime by executing:
npm run dev
Or start a watcher which compiles your assets automatically after detecting a filechange:
npm run watch
The compile process will generate the app.js file which is missing in your case. You can read more about this process or possibilities in laravel here (laravel docs about frontend).
After pulling your project you need to install all dependencies using
npm i
Then you can build it for development one-time using
npm run dev
Or for real-time updates
npm run watch
And when your project is ready for production
npm run prod

How to build Botframework-WebChat v4

Sorry for asking this, but how can i build the botframework-webchat v4.5.2? I ran 'npm run bootstrap' and 'npm run build'. Both commands exited successfully, but i can't find the webchat.js file.
You need to run npm run build:sample when you are first getting started. Then the normal build and watch commands should build the webchat.js files from then on. Not sure if this is documented anywhere.
npm install
npm run bootstrap
npm run build:sample
npm run build
To run the test harness run npm run start:docker and wait for the command to finish - it should take awhile for docker container to build. Then in another terminal run npm test.
Hope this helps!

It's possible auto load or livereload npm run dev

I want to know if exist some way to live reload or autorun the npm run dev command without type in the shell npm run dev
When i use VueComponents in Laravel with Webpack Mix, for every change in code i need run npm run dev and that proccess is delayed a lot
In the past, i did use ionic, and when i had saved a change the pack is live reload and had build without type nothing in the shell
Thanks!
Try running this command:
npm run watch
or
npm run watch-poll
When you create new component/js file and attach it to Webpack
Mix then you need to run
npm run dev
Real-time monitor the changes and compile them
npm run watch
For production mode run
npm run production
To go back to development mode
npm run development

"npm install -g yo" on Windows 7

on the following setup
Windows 7 Enterprise edition.
MyNodeJsCommandPrompt>node --version
v4.1.1
MyNodeJsCommandPrompt>npm --version
3.5.0
When I run the following
npm install -g yo
I get errors of this type
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\MyCodeDirectory\npm\node_m
odules\yo\node_modules\update-notifier\node_modules\latest-version\node_modules\
package-json\node_modules\got\node_modules\read-all-stream\node_modules\pinkie-p
romise\node_modules\pinkie' -> 'C:\MyCodeDirectory\npm\node_modules\yo\node_modules\glob
by\node_modules\pinkie'
Can anyone help? Thanks.
Try to use :
npm cache clean
One time, it solved my problem.
This is what solved my problem.
I ran this once. Thanks to #Akram_Saouri
npm cache clean
However, that did not solve the problem by itself. After that I reran the command multiple times.
npm install -g yo
Every time I reran the command it kept throwing the same problem, but I noticed that it kept throwing the same problem for different files. And every time I ran it, it kept making some more progress but would stop on a different file, further down the installation process.
After multiple tries, it ran till the end with a bunch of WARNINGS but there was no ERROR at the end.
So, it was solved, with the steps mentioned below. But, truth be told, I am not sure exactly what solved the problem.
Thanks.

Resources