I have trouble with my js code and i can’t fix it.
I watched a tutorial from youtube how to get after effects file to web pages and tried to get my animation work but in .js file i got errors.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
You have a spelling mistake in your function. It’s renderer not rederer according to the docs
Error 1 can be caused if the script tag to load bodymovin onto your website is below the script tag of the JS file where you are trying to use it.
In the HTML markup for your website the script tags needs to be in the correct order. Script tags in the head of your HTML are loaded before script tags that are added to the bottom of the body tag. bodymovin will need to be your first script tag and then your own js file needs to be loaded after it and not before it.
My overall suggestion would be to create a minimum version of your website in codepen.io or codesandbox.io that replicates your issue. It will it make it easier of us to help you.
That is just your HTML file. That only shows us that you are loading the scripts in the correct order. I would still suggest you use something like https://codesandbox.io to recreate a minimal version of the website that shows what you are trying to do and that allows us to replicate the error messages. That is the easiest way for someone here to assist you.
I actually created my minimal version in codesandbox but since i can’t send a link here it wasn’t helpful. I have only basic html and js code that i have already posted here. I have only code about animation that i need to get work. However, do you have any idea how you would get access to my codesandbox? Or what should i do?