I'm trying to make changes inside of a .js file that of which compiles successfully according to npm run watch outputs. The change I made is inside of a console.log(); statement just to test out if my changes get reflected. I've tried cmd + shift + r because I thought it could've been cached but it seems that's not the case. What could be a reason why? I've tried running npm run dev as well but to no avail. What am I missing here?
try to restart your server
if a restart does not work then
php artisan cache:clear
php artisan config:clear
Related
It's been a few days now, that my changes in the code (controller, event, blade or any other php files) are not reflected at runtime.
For my changes to be taken into consideration, I have to close my code editor (VSCode) and open it again and type the command "npm run watch" even for PHP files.
My working environment is under Window 10 with VSCode, Laravel 8, PHP 7.4.
I specify that I have already tried the following commands:
php artisan config:clear, php artisan route:clear, php artisan view:clear, php artisan event:clear
That I have already deleted the VSCode cache manually and that I delete the cache of Chrome on every run, but nothing changes except close my project and reopen it and run the "npm run watch" command even if no such file is affected.
Does anyone have an idea for me, because I will soon have no more hair :-D?
I installed Laravel through composer using PHP 7.3.25 through xampp v3.2.4. I first noticed the problem: cli stopped working, during
php artisan serve
I scoured SO and the internet for possible fixes. Going through these commands fixed this problem for me (or so I thought):
composer update --no-scripts
php artisan clear-compiled
composer dump-autoload
But every time I turn on the PC, I get the same error and have to follow these steps to make it work. Antivirus did not have anything to do with it (I checked). Is there any way to fix this without having to completely reinstall everything?
Its ist important to understant few points related to following queue:restart command.
The queue workers' age confirmed that they restarting in response to that.
php artisan queue:restart
Ref: https://laravel.com/docs/8.x/queues#queue-workers-and-deployment
I am developing a web app using Symfony. I have successfully been using console commands fine with my project. I must have done something because now the command php bin/console make:migration freezes, with no output even in verbose mode. The command php bin/console make:entity works fine and makes me think there is something wrong with the database connection. Steps I have tried:
Make sure the DB version is present in .env file.
Restarted server
Deleted cache
Deleted entire project and cloned from git and ran composer install
The app still works as intended, but I cannot make a migration. The command simply hangs with no errors. Any suggestions on how to debug this?
You can add different levels of verbosity using the parameter "-v", as the Console list explains:
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Launch php bin/console make:migration -vvv to debug and see why it hangs.
It is not frozen. In this update, they have forgot to print the message.
The message is "Are you sure you wish to continue? y/i"
If you enter y and hit enter it will be continued.
I've been having some issues setting up my local server. I can get it to run with php artisan serve, but I can't add npm run watch at the same time.
I've done npm install and updated my node too. It says to run php artisan serve first and then to run npm run watch, but once I've done the artisan serve, it doesn't let me type in anything else.
If I run npm run watch before php artisan serve, it opens up the wrong port (3000 instead of 8000), too.
Can someone please let me know what is going on? Have you encountered this before? Nothing I could find on here matched my problem, but in case I missed it, please let me know. And if you need any further information, as in logs, etc.
Open a new terminal tab and run npm run watch on that one. If you are using default Windows cmd take a loot at cmder or the new Windows Terminal.
My IDE is phpstorm and running on WAMP Server. While coding, it does not show the expected response, always returns the previously requested response (In postman). Each time, I need to close 'php artisan serve' with CTRL+C and then run again to get the expected response.
I tried changing IDE, changing port but it does not work. Of course, I tired to save manually ( CTRL+S) but the problem persists.
I also tried the following commands:
php artisan cache:clear
php artisan config:clear
php artisan route:clear
composer dump
But the problem still persists.
The issue might be the composer command. Please, have a look on my setup in the Makefile:
run:
php artisan config:cache
php artisan config:clear
php artisan cache:clear
composer.phar dump-autoload -o
php artisan serve
And it's ready to go with a Laravel's "clean build".
Can you try with a diferent request tool, like doing a GET on your browser?
Or just create a new endpoint to test that. This way you make sure that changes are being saved.
I recommend you make tests to see if:
the problem is on your postman (a cache maybe?);
the problem is that your code isn't being saved;
the problem is on your local server (a persistent cache?);
My tip is: Try to eliminate the possible causes and you should achieve an answer.
Let´s try to make sure about above items and if them are ok, we check possible another ones.