I am using Frappe framework to develop a web application alongside ERPNext app and my custom app.
Everything is working as expected on the website. However, VSCode keeps on throwing errors all over the code, especially JavaScript files that includes Jinja and other JavaScript files that doesn't. I hope anyone could help me solve these errors. I will share some screenshots of the errors along side the extensions i installed to solve these errors but didnt and my jsconfig.json
file and my workspace file & folders structure.
Also, i am sure that my jsconfig.json
file is incorrect because i get ireelevant intellisense suggestions but i am dont know it supposed correct syntax for my case
jsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"target": "es2020",
"jsx": "preserve",
"checkJs": true,
"experimentalDecorators": true,
"strictFunctionTypes": true
},
"include": [
"**/*.*"
]
}
I have the following extensions installed:
batisteo.vscode-django-1.8.0 ms-python.vscode-pylance-2021.12.2
dbaeumer.vscode-eslint-2.2.2 ms-toolsai.jupyter-2021.11.1001550889
donjayamanne.python-environment-manager-1.0.3 ms-toolsai.jupyter-2021.5.745244803
donjayamanne.python-extension-pack-1.7.0 ms-toolsai.jupyter-keymap-1.0.0
equinusocio.vsc-material-theme-icons-1.2.2 ms-toolsai.jupyter-renderers-1.0.4
github.github-vscode-theme-5.1.0 netchampfaris.frappe-intellisense-0.2.0
gitlab.gitlab-workflow-3.40.0 njpwerner.autodocstring-0.5.4
humao.rest-client-0.24.6 samuelcolvin.jinjahtml-0.16.0
kevinrose.vsc-python-indent-1.14.2 visualstudioexptteam.vscodeintellicode-1.2.15
ms-python.python-2021.12.1559732655 wholroyd.jinja-0.0.8
I also added the following to my settings.json to make the Better Jinja extension work in my files (I copied it from other stackoverflow topic) but it didnt work as well
"emmet.includeLanguages": {
"jinja-html": "html",
"jinja-js": "javascript",
"jinja-py": "python"
}
This is my workspace structure. All of my development is inside the folders of the apps
folder which contains a folder for each installed app. However, my workspace is like this because i sometimes need to use other folders other than the apps
folder.
And these are the errors that are generated in two files - the path of each file is in the screenshot: