Jump to content

random vscode errors

Im trying to just learn javascript in vscode, and it gives me random false errors, like "Cannot find name gsap. ts(2304)" when trying to do anything with gsap, even tho the animations work just fine. Chatgpt told me to edit some configuration files in the project directory, but there isn't any. And i of course did link the gsap in my html file, and it's before my javascript code

image.png.863e38992951ca89a26c767043c55325.png

image.png.e800d2cbaef114d1bfdf53280ef8a312.png

Link to comment
Share on other sites

Link to post
Share on other sites

VSCode just is not able to infer that it needs to donwload that minified gasp file, so it doesn't have access to the source, hence why it says its not defined.

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, igormp said:

VSCode just is not able to infer that it needs to donwload that minified gasp file, so it doesn't have access to the source, hence why it says its not defined.

how can i fix it then? i tried putting the gsap.js file in the folder and linking it instead, but still the same error

Link to comment
Share on other sites

Link to post
Share on other sites

33 minutes ago, MiszS said:

like "Cannot find name gsap. ts(2304)" when trying to do anything with gsap

Bottom right of vscode ensure JavaScript is selected as the language not Typescript.

Link to comment
Share on other sites

Link to post
Share on other sites

36 minutes ago, C2dan88 said:

Bottom right of vscode ensure JavaScript is selected as the language not Typescript.

it is

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×