antiboredom / p5.vscode

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

Libraries aren't added to index #31

Closed hifiguyy closed 2 years ago

hifiguyy commented 2 years ago

Hi, newbie q, but when I install libraries I get the error "Make sure your workspace includes an index.html and a libraries folder."

I have both, but libraries aren't added, and index file isn't updated. Not sure if I missed a critical step.

antiboredom commented 2 years ago

Hi! you need to make sure that you've opened a folder in vscode that can be recognized as a p5.js project. This means the folder needs to at least have an index.html file in at, and another folder called libraries.

Sometimes this can get confusing in vscode because it's possible to open just a file rather than a folder. So, when you're opening up a project don't open index.html or sketch.js, open the folder that contains those items.

The other possibility is that the extension is having trouble parsing your index.html file. Did you generate the p5js project using the extension?

hifiguyy commented 2 years ago

Hi Thanks, It works now. I think when I created a new project folder there was conflict with one of the other extensions I installed. I removed the others, and recreated the project. I'm not sure if this is related, but this time a jsconfig.json, and a css style sheet got installed as well, and a new vscode instance opened with the folder.

Either way it looks to be working perfectly now.

Thanks!