-
Notifications
You must be signed in to change notification settings - Fork 28.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsconfig.json sometimes not taken into account #703
Comments
I just reproduced it again. Made a new directory, and moved a file into it. Everything gets the red underline and the warning "This can only be used with ES6. Make sure to have a jsconfig.json-file which sets the target to ES6". Restart VSCODE and it goes away. |
I have the same problem except while restarting normally fixes this, in this case it's still no working after a restart for a file called schema.js |
This bug makes VS Code completely unusable for ES6 development since the whole editor is obfuscated with red underlines. I sometimes manage to get it resolved by editing jsconfig.json (add whitespace, save) but then again, only sometimes. Sounds quite critical to me? |
+1 |
+1 This is driving me mental! Completely random too. |
I can reproduce with a simple sample but after a short while (2-3 seconds) it recovers. I guess you guys are dealing with large projects? |
+1 |
@jrieken My project is about 25 .js-files in different subdirectories. The tree is up to 3 directories deep. |
How's this for bizarre - I'm getting this same issue in my project, but only in a handful of files that start with the word 'template', like The affected files are:
There are maybe ~100 other My colleague had the same issue, but it went away when he restarted VSCode - that doesn't work for me, makes no difference, nor does editing and resaving the |
On Windows VSCode can see jsconfig.json and work properly. But when open project from network drive, VSCode can't see jsconfig.json and show errors on ES6 code. I have project on VM centos and map a Windows network drive to projects folder. All right, except ES6 errors. |
I'm having the same problem. It happens only on directories that are 4th level or deeper. If I move the file up one directory, the error goes away. |
+1 |
+1 I have the same issue and it seems to be random. Sometimes when I restart Visual Studio code it disappears, sometimes not. |
We will tackle for Dec |
@skovmand For you specific case, can you check if the full path of your files (bpm.js, bpmController.js, ...) contains |
@nrkn I have a fix for the |
@yevk About the 4th level directory. Is it that they either start with |
This also seems to be the case with shebang scripts. A file at |
@janders223 Yeah, at that point in time we cannot look into each and every file... |
yeah, I could reproduce and fixed it on master. |
I understood and tackles these tasks
Anyone, please speak up if you don't see your issue(s) addressed by that. |
@jrieken what about files that contain several dots ? like |
I see that working fine @warpdesign |
Closing, the remaining work wrt to shebang and files with an extension will be tackled in #1097. |
@jrieken can you please add steps for verification |
I'm still having the same issue as @Cirych. When opening a folder over a mapped network drive (in this case opening my Linux folder on Windows). Opening the folder while mapped causes VSCode to show everything as syntax errors. Copying my code over to Windows and then opening VSCode to the new folder causes errors to disappear and for intelliSense to work again. |
I have this error too. I try write ES6 in root site files (etc. wabpack.config.js, test.js) and have red underlined. |
Same issue. Using |
Same issue here. In one project it works in another (was a copy of the first) it doesnt. Same content in jsconfig.json. Typings are underlined though. |
I also have the same issue using the gulp file from this tutorial: The arrow function is the issue. I include the needed jsconfig and nothing? Has anyone solved this yet? |
I also have the issue the jsconfig.json is not being read. Tested with Visual Studio Code v1.5.3 and v1.7.0 insider, on Windows x64 (version 1607). When using Sysinternals process monitor, I see that VC Code is getting some information about jsconfig.json (QueryAllInformationFile), but does NOT read the file (ReadFile). Log when opening VS Code (with the current project) (reduced to jsconfig.json and my test file) Log when actually opening jsconfig.json inside VS Code (so something like that should also happen when launching VS Code): Not reading jsconfig.json unfortunately means that "go to definition" doesn't work for me with my own js files, what hinders me from switching from Netbeans to VS Code :( I would really appreciate if this issue could be fixed. If you need further information, or my stripped down example, just let me know! |
I just saw that this bug is closed - will open a new/fresh one... |
Hi.
Thanks for your product, I really enjoy using it. However I have one problem:
When using ES6 features, like the arrow functions, I get the message "This can only be used with ES6. Make sure to have a jsconfig.json-file which sets the target to ES6".
However I have a
jsconfig.json
-file in my root (the folder opened in Visual Studio Code), which contains:The weird part is that I get it for some files, and not for others. Even if the files are in the same directory. Right now I have three files in the subdirectory
/app/bpm
namesbpm.js
,bpmController.js
andenterClick.js
. All three are written with ES6-functionality, but I only get the warning and red underlined text forbpm.js
.UPDATE:
I just restarted VS Code, and the red underline disappeared from
bpm.js
too. It was a new file I had created after the two others, however the red underline only went away after a restart.The text was updated successfully, but these errors were encountered: