Great video! Darynazar you didn't mention running npm install before running npm run dev. Without with it will give error about encore dev. But I see in video that you have already package-lock.json so you run it before recording video :)
So far this course is excellent. I am using to get back into symfony as the last version I used was around 3 I think. I haven't had a problem until this video (front end stuff is always a hassle). When running npm run dev I get an error "./assets/bootstrap.js" contains a reference to the file "@symfony/stimulus-bundle". This file can not be found, please check it for typos or update it if the file got moved. It is 2024 right now I see this video came out in 2022??? So I am on version 6.4 atm. Seems symfony has made some changes with the --webapp flag that nullifies using encore? Anyway, the solution I found was suggested to recreate the application without the --webapp flag, basically a bare bones installation. I am sure this will create more headaches as this goes along. Otherwise, pretty good tutorial.
Tip: if you run npm run watch before adding method1.js in app.js and method2.js in webpack you will got compiled only method1.js. To get method2.js in build folder you need run npm run dev.
Hey, great video. However I've discovered, that I do not get the asset/controller folder after running composer require symfony/webpack-encore-bundle. Nor the bootstrap.js file. Just the app.js and asset/styles/app.css. What step is missing? Cheers
"./" doesn't go back one directory. It's a pointer to the current directory (/assets/). If you like to go back or up one directory, you have to write "../" (which would be wrong here).
Great video! Darynazar you didn't mention running npm install before running npm run dev. Without with it will give error about encore dev. But I see in video that you have already package-lock.json so you run it before recording video :)
Whoops, I think that I cut that part out by accident when I was trying to shorten the composer install section, hehe thank you.
@@codewithdary Not at all! Keep up the good work!
@Ilyas Bakirov will do my friend!
Came looking for this, thanks!
So far this course is excellent. I am using to get back into symfony as the last version I used was around 3 I think. I haven't had a problem until this video (front end stuff is always a hassle). When running npm run dev I get an error "./assets/bootstrap.js" contains a reference to the file "@symfony/stimulus-bundle".
This file can not be found, please check it for typos or update it if the file got moved. It is 2024 right now I see this video came out in 2022??? So I am on version 6.4 atm. Seems symfony has made some changes with the --webapp flag that nullifies using encore? Anyway, the solution I found was suggested to recreate the application without the --webapp flag, basically a bare bones installation. I am sure this will create more headaches as this goes along. Otherwise, pretty good tutorial.
Tip: if you run npm run watch before adding method1.js in app.js and method2.js in webpack you will got compiled only method1.js. To get method2.js in build folder you need run npm run dev.
Hey, great video. However I've discovered, that I do not get the asset/controller folder after running composer require symfony/webpack-encore-bundle. Nor the bootstrap.js file. Just the app.js and asset/styles/app.css. What step is missing?
Cheers
Same here. Did you find out the "problem"?
I ran "composer require symfony/stimulus-bundle" and the missing files were added.
then I also called "npm add @symfony/stimulus-bridge @hotwired/stimulus --dev" . I am new on web development, so I am not sure what I am doing :)
Thanks a lot for this.
It's really helpful for me
Thank you, Umme :)
@@codewithdary all pleasure is mine
thank you Dary
No worries Najim.
"./" doesn't go back one directory. It's a pointer to the current directory (/assets/). If you like to go back or up one directory, you have to write "../" (which would be wrong here).
is there a way to define functions also and call them inside twig
Your function will most likely send back some kind of value which you can use
Friends, deleting/editing these lines can lead to various problems:
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
noice
Thank you for watching :)
ENCORE is the stupidest, incomprehensible and redundant project that has ever been in programming.
:(