Chapters
23 Chapters
|
2:07:02
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!
Subscribe to download the code!
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
This tutorial is built on Symfony 6 but works great on Symfony 7!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=8.2",
"ext-ctype": "*",
"ext-iconv": "*",
"babdev/pagerfanta-bundle": "^4.0", // v4.2.0
"doctrine/doctrine-bundle": "^2.7", // 2.10.0
"doctrine/doctrine-migrations-bundle": "^3.2", // 3.2.4
"doctrine/orm": "^2.12", // 2.15.2
"knplabs/knp-time-bundle": "^1.18", // v1.20.0
"pagerfanta/doctrine-orm-adapter": "^4.0", // v4.1.0
"pagerfanta/twig": "^4.0", // v4.1.0
"stof/doctrine-extensions-bundle": "^1.7", // v1.7.1
"symfony/asset": "6.3.*", // v6.3.0
"symfony/asset-mapper": "6.3.*", // v6.3.0
"symfony/console": "6.3.*", // v6.3.0
"symfony/dotenv": "6.3.*", // v6.3.0
"symfony/flex": "^2", // v2.3.1
"symfony/framework-bundle": "6.3.*", // v6.3.0
"symfony/http-client": "6.3.*", // v6.3.0
"symfony/monolog-bundle": "^3.0", // v3.8.0
"symfony/proxy-manager-bridge": "6.3.*", // v6.3.0
"symfony/runtime": "6.3.*", // v6.3.0
"symfony/stimulus-bundle": "^2.9", // v2.9.1
"symfony/twig-bundle": "6.3.*", // v6.3.0
"symfony/ux-turbo": "^2.9", // v2.9.1
"symfony/web-link": "6.3.*", // v6.3.0
"symfony/yaml": "6.3.*", // v6.3.0
"twig/extra-bundle": "^2.12|^3.0", // v3.6.1
"twig/twig": "^2.12|^3.0" // v3.6.1
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4", // 3.4.4
"symfony/debug-bundle": "6.3.*", // v6.3.0
"symfony/maker-bundle": "^1.41", // v1.49.0
"symfony/stopwatch": "6.3.*", // v6.3.0
"symfony/web-profiler-bundle": "6.3.*", // v6.3.0
"zenstruck/foundry": "^1.21" // v1.33.0
}
}
8 Comments
Hi,
I have trouble getting run a specific library. It is vis-timeline that can be accessed via jsdelivr.com.
Here is what I did:
First I installed vis-timeline via
php/bin importmap:require vis-timelinewhich gives me 3 items:So that seemed to be successful.
Now I want to use the libraries in one of my stimulus controllers:
However I run into errors:
So whats missing or what do I wrong?
Thanks for any help here.
Oliver
Hey Oliiver,
I personally haven't used this library, can't say much about it. But it seems like you're trying to import it incorrectly. Maybe try this way:
I wonder if it works this way, though it's mentioned as a legacy way, so probably there should be a better way. I also see it's imported as
vis-data/peerso probably you should import it that Peer way? See the docs: https://github.com/visjs/vis-timeline?tab=readme-ov-file#peer-buildI hope that helps!
Cheers!
Hi Victor,
thanks for your reply.
I figured out what the problem was. First I wondered why vis-data throwed the error but not vis-timeline. I removed all references to vis-data and then the error was gone. So I assumed that vis-timeline was importing correctly.
Then I checked importmap again and saw something interesting.
I used only one importmap:require vis-timeline, which imported three things:
In importmap I saw the following
So with that I concluded that I need to import 'vis-data/peer/esm/vis-data.js' and not something else.
And "tada" the error was gone.
I am not at the end. There is a subsequent error I need to take care of, but the initial error is gone, which seems, that the libs are loaded correctly.
Thank you
Oliver.
PS:
I might come back, if I need help with the next error.
Latest update:
remove all vis-timeline related libs
add vis-timeline/standalone
Use the following imports:
And thanks for sharing the final solution with others!
Cheers!
Hey Oliver,
Good thinking! I'm glad you were able to fix that, indeed it makes sense to include that path that exists after you install the package, good job!
Cheers!
i have a big Problem: how to install opencv.js ? thats not possible at my projects
hey @timm
What about
php bin/console importmap:require opencv.js? Does it work?Cheers!
"Houston: no signs of life"
Start the conversation!