antiboredom / p5.vscode

A VS Code extension to generate new p5.js project files.
Other
56 stars 16 forks source link

Error in jsconfig.json #50

Closed JoePShoulak closed 1 year ago

JoePShoulak commented 1 year ago

I updated VS Code and afterward noticed that VS Code was reporting errors in my jsconfig.json file. I usually notice that sort of thing, so I checked another project, and it's reporting the same error (when I don't think it did before).

image

File 'c:/Users/joeps/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.d.ts' not found. The file is in the program because: Default library for target 'es3'

This error is shown (9 times, for some reason).

Maybe there was a change to the pathing in the latest update?

antiboredom commented 1 year ago

Hi - I'm not getting this but I am also on a mac, and wondering if this might be a bug I introduced in windows only. Can you send me a sample jsconfig.json file?

JoePShoulak commented 1 year ago

Absolutely, it looks like this:

{
  "include": [
    "*.js",
    "**/*.js",
    "c:\\Users\\joeps\\.vscode\\extensions\\samplavigne.p5-vscode-1.2.12\\p5types\\global.d.ts"
  ]
}
antiboredom commented 1 year ago

Thanks! Can you replace all of the double slashes with a single slash (except for the two after “c:”) and let me know if that fixes it?

JoePShoulak commented 1 year ago

I believe that fixes it! No errors!

antiboredom commented 1 year ago

Great. I‘ll try to push a fix in the next day or so. Thanks for posting the issue and your help in debugging it!

JoePShoulak commented 1 year ago

My pleasure! I can't image using p5 in VS Code without the intellisense that your extension provides, this is the least I can do in return!

JoePShoulak commented 1 year ago

Hmm, I may have been wrong. This is an error I'm getting with the corrected pathing:

{
  "include": [
    "*.js",
    "**/*.js",
    "c:\\Users/joeps/.vscode/extensions/samplavigne.p5-vscode-1.2.12/p5types/global.d.ts"
  ]
}

image

chanbinna commented 1 year ago

I am on Mac and I am having same issue too

antiboredom commented 1 year ago

well, I'm getting the error now too!

antiboredom commented 1 year ago

I think some update to vscode has changed things. Can you both try adding this to your jsconfig.json files:

  "compilerOptions": {
    "target": "es6",
  },
antiboredom commented 1 year ago

Hi - just pushed the changes that I think should fix things - make sure to update the extension (or let it happen automatically) and then let me know if it fixes the issue! Thanks for your patience...

JoePShoulak commented 1 year ago

Looks like that did it for me!

antiboredom commented 1 year ago

Great - closing the issue now…