Fortls error with modern fortran and fortran intellisense

Hey, I am looking forward to someone who can help me resolve the issue of “Error spawning fortls: Please check that fortran-language-server is installed and in your path.” in VS Code. I am using the modern fortran.
I have tried multiple times to resolve the issue, but it remains persistent no matter what (probably i don’t know much about vs code)

I have added the path in settings.json, environmental variables (path and path to executable).

I would appreciate any help i can get

Just to let you know I have following lines are on the settings.json

“modernfortran.ls.path”: “C:\Users\xxxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts\fortls.exe”,
“fortran-ls.executablePath”: “C:\Users\xxxxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts\fortls”,

There is not enough information to get to the root of your problem. There are many posts in this Discourse and the web troubleshooting such problems. Here are some examples, which you might want to read and try as solutions:

My guess is that you are using an outdated version of vscode and/or modern fortran and/or fortls and/or using deprecated third-party extensions and/or passing incorrect options to vscode. There are simply too many unknowns. Easiest way to get to the bottom of this is update your VSCode, Modern Fortran to the latest Pre-Release and install with pip fortls. Follow the errors that pop up, try and resolve them using the posts above (or others you might find) and post any questions if you get stuck.