compilation successfully while running the command npm run watch on compute engine but no any changing effects - laravel

Compilation successfully while running the command npm run watch on compute engine ubuntu terminal but no changing effects. I use the Larave+Vue project hosted on the Ubuntu VM instance on GCP. I search much time for this issue but not able to find any solution. I found a similar problem on StackOverflow but there is no answer to solve my problem. Please check the link below:
I am using Putty to run and compile vue js + laravel app on Godaddy VPS. Changes are not taking effect
Please help...
Thanks in advance.

Maybe try npm run watch-poll instead, on certain systems watch doesn't trigger changes but wacth-poll will periodically checks (polls) for changes.

Related

Displaying Most NODE_OPTIONs are not supported in packaged apps error after npm command

"Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details." error is displaying in the vs code console after I enter the npm.
This issue comes up after I installed cypress version 9.4.1. The code is running fine but every time I run the code this error message comes up.
Why this issue is displaying and can someone explain to me how to fix this, please?
I solved this problem
But the point is that I use Angular version 14
I run the command ng e2e to solve this problem
Then I selected cypress among the suggested options in the command line

Nextjs project is not hot reloading in MacOs

Well, i try searching a solution but i cant find anything.
A coworker passed me project in NextJs (With React of course). I run yarn install, and then yarn run dev, the server starts but when i made a change in the code, it is not hot reloading! I have to stop and start the server manually each time.
I tried sudo yarn run dev, i tried with npm, y tried a lot of things.
I dont know much about MacOs, i just bought this days ago... The project work perfect on my Windows machine.
This are my current node and yarn version on mac
devmcgann#MacBook-Pro-de-Gabriel instashop-webapp % node --version
v12.16.1
devmcgann#MacBook-Pro-de-Gabriel instashop-webapp % yarn --version
1.22.4
Edit: I tried making a simple react app and hot reload work perfect there.
But with nextJS the problem persists
Thanks!
I had similar issues. The problem was the incorrect imports.
Some of my files and folder were in lowercase but in imports I was using uppercase.
Even though the build is successfully done without error, the hot reload doesn't work. So I had to correct them in order to make them work.
Make sure your routes case matches the case of the folder.
Make sure the component name has to start with the upper case. If your file name is dashboard.jsx, the component name should be Dashboard.
// home/dashboard.js
const Dashboard = () => {
....
}
export default Dashboard
Well.. This is rare.
Yarnd install and also npm install. I didnt now that i will need both.
Fixed.

Errors running Laravel Dusk

I just discovered Laravel Dusk, and I was excited to use it in my project. However, it can't seem to get it to work. I followed the Laravel Documentation to install Dusk. When I run php artisan dusk in the terminal, I get
[Symfony\Component\Process\Exception\RuntimeException]
TTY mode is not supported on Windows platform.
I found this (https://github.com/laravel/dusk/pull/13/files) which is supposed to fix it I think, but I still get the error.
Also, I attempted to run the Dusk tests through PhpStorm following the accepted answer here (https://laracasts.com/discuss/channels/testing/dusk-via-phpstorm), but I get a Class config does not exist error. Many people said that this caused by a space in the .env file, but that is not my issue.
Can anyone help me figure out what is going on with Laravel Dusk in my setup? My Laravel project is 5.4 and I'm using Laravel Dusk 1.0 and PhpStorm is 2017.2.1
You can install chromedriver into windows on your own, and try not to use the version that is shipped with laravel dusk. Remember that, your chromedriver version needs to match your currently installed Chrome version, and when Chrome gets updated, then you need to update/reinstall chromedriver manually again. Hopefully it does not happen too often, and when there are updates, you benefit from using latest versions, which I find really nice :)
Download it here.
After installing chromedriver, you need to start it from command line (just issue command in your download/install directory chromedriver) or add it as service (which I do not prefer, cause I want to have control of which service is running on 9515 port).
Finally you need to comment out // static::startChromeDriver(); in your DuskTestCase.php, which tries to start laravel dusk included chromedriver, cause in this case, you are already running one.
Run dusk tests again and all should be working fine.
I don't know what your system setup is, but I am using this workaround on windows 10 with Laravel 5.5, dusk 2.0, which still causes problems, when chrome gets updated.
BTW. Just to mention. This also works with CI workflows using docker. You can read more about it here

Making a Mean stack application with angular cli?

I am a beginner to Angular2.
This is the article I was following:
https://scotch.io/tutorials/mean-app-with-angular-2-and-the-angular-cli
Tl;dr: ng new app, ng serve, npm install express etc, create server files, ng build and finally node express.js to serve index.html from dist
My problem with the app build in this article is that it serves from dist which means I would have to stop the server, run a new build and restart the server on every change which is quite cumbersome from pov of a developer. I want my changes to the client side to be reflected on each refresh.
Can someone point me in the right direction so as to achieve this? Or let me know how to to get the architecture right even if it means starting from scratch
PS:I have been trying to modify this example to serve from development (src/) however so far am unsuccessful. The browser is unable to find dependencies, shows the "loading.." throws errors like "System is not defined" and "Syntax error '<'.
I understand your pain point. I've seen this tutorial and its fair up to some extent, but as you said there is no auto-refresh script written for changes. However, I have then decided to create my own repository for the MEAN stack project development. Check the following URL where I hosted my MEAN app including
browser-sync
gulp
nodemon
https://github.com/darpanpathak/MEAN2-MarvelApp
This repository will help you a lot for starting MEAN stack application with angular2.
thumbs up if you are looking for the same.
Tl;dr: ng new app, ng serve, npm install express etc, create server
files, ng build and finally node express.js to serve index.html from
dist
To make webpack to watch your changes during development you just have to add --watch when you build your app. So you should type something like this in a console terminal:
ng build --watch
And then run your server:
node server.js
That should work.
I came across this problem as well, so I wrote a little post about it.
You can find the detailed solution here.
In summary, what worked for me is to use different ports for the server and client, and configure my npm start command to run both server & client in parallel.
You will have hot reloading (when you change the client code, it will refresh the web browser instantly), and the web page will call your server API.
BTW, I couldn't make ng build --watch to work, so I had to think about this workaround.

Laravel spark project create issues

Please help me solve this issue.Everything is fine. Its ubuntu. The spark create new project gives this error.
Maybe you have to do a
source ~/.bashrc
From the documentation:
Finally, you are ready to run the spark:install command:
This is of course using a different installation method to the binary they supply. In fact they recommend other methods as well such as setting up a new Laravel project and adding Spark as a dependency:
https://spark.laravel.com/docs/1.0/installation#installation-via-composer
running:
php artisan spark:install --force
once you have followed their installation steps from the above link (correct as of time of writing).
I've personally used the latter method and never had a problem with it. Please give it a go and let us know the results.

Resources