You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
jsconfig.json sometimes not taken into account #703
bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityjavascriptJavaScript support issuesverifiedVerification succeeded
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 names bpm.js, bpmController.js and enterClick.js. All three are written with ES6-functionality, but I only get the warning and red underlined text for bpm.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.
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".
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 template-controller.js etc. - however, not with templates.js
There are maybe ~100 other .js files where the red underlines don't appear when using ES6 syntax
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 jsconfig.json.
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.
When I copied project to Windows local folder - everything seems Ok with ES6 speling.
I'm still having the same issue as Kirill Ezhemenskii (@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 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)
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!
bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityjavascriptJavaScript support issuesverifiedVerification succeeded
Activity
[-]jsconfig.json sometimes not being read.[/-][+]jsconfig.json sometimes not taken into account[/+]skovmand commentedon Nov 26, 2015
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.
gerrywastaken commentedon Nov 26, 2015
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
jaccus commentedon Nov 26, 2015
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?
warpdesign commentedon Nov 26, 2015
+1
Same problem, had to disable builtin js validation.
nverba commentedon Nov 27, 2015
+1 This is driving me mental! Completely random too.
jrieken commentedon Nov 27, 2015
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?
mbarzeev commentedon Nov 30, 2015
+1
This is very annoying, and as others have mentioned - this is a key feature.
skovmand commentedon Nov 30, 2015
Johannes Rieken (@jrieken) My project is about 25 .js-files in different subdirectories. The tree is up to 3 directories deep.
nrkn commentedon Dec 1, 2015
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
template-controller.jsetc. - however, not withtemplates.jsThe affected files are:
There are maybe ~100 other
.jsfiles where the red underlines don't appear when using ES6 syntaxMy 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
jsconfig.json.Cirych commentedon Dec 1, 2015
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.
When I copied project to Windows local folder - everything seems Ok with ES6 speling.
24 remaining items
jrieken commentedon Dec 8, 2015
Closing, the remaining work wrt to shebang and files with an extension will be tackled in #1097.
dbaeumer commentedon Dec 16, 2015
Johannes Rieken (@jrieken) can you please add steps for verification
jrieken commentedon Dec 16, 2015
Dirk Bäumer (@dbaeumer) #703 (comment)
mdpratt commentedon Feb 1, 2016
I'm still having the same issue as Kirill Ezhemenskii (@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.
lironka commentedon Feb 27, 2016
I have this error too. I try write ES6 in root site files (etc. wabpack.config.js, test.js) and have red underlined.
jsconfig.json- doesn't work!StarpTech commentedon Mar 10, 2016
Same issue. Using
jsconfig.jsondoesn't work. e.gconstkeyword is red underlined.matthiasg commentedon Apr 19, 2016
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.
mortonprod commentedon Jul 20, 2016
I also have the same issue using the gulp file from this tutorial:
http://www.mithunvp.com/angular-2-in-asp-net-5-typescript-visual-studio-2015/
The arrow function is the issue. I include the needed jsconfig and nothing? Has anyone solved this yet?
malte-timmermann commentedon Oct 12, 2016
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)
http://pastebin.com/GTKHPCZC
Log when actually opening jsconfig.json inside VS Code (so something like that should also happen when launching VS Code):
http://pastebin.com/je8Y3p4C
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!
malte-timmermann commentedon Oct 12, 2016
I just saw that this bug is closed - will open a new/fresh one...