Hi, I’m getting myself confused and going around in circles so hoping someone can help.
I’m a good enough developer that I know how to cut code, but with new environments such as CustomJS in Obsidian my knowledge is lower than it needs to be.
I find I keep needing to add a node package into CustomJS but none of the require statements work. If I run npm add <package> where will the files go (my past experience is in the subfolder of the code I’m working on - and I don’t want that all in my vault). but if I use npm add -g <package> it installs centrally and is never picked up.
Q1: Is it even possible to add new node packages for CustomJS?
@mnaoumov I got CodeScript Toolkit working. Looking to do some image manipulation. I know it’s working because Jimp was accessible - but it doesn’t do webp! Trying to use Sharp instead and it seemed to be partially loading. I couldn’t work out why. Seemed to load some supporting .js files but not all. Should I be trying the async method? It could also have been missing supporting libraries?