Debugging: How to find where mystery divs are coming from

I recently installed and then uninstalled the aria-modal-dialog npm package. Somehow my code is now generating three 0px by 0px divs and inserting them above the header, which is throwing off the layout, and I'm having a heck of a time finding where they're coming from. GH: https://github.com/nnall/DevJobs-FEM.git Live: https://main--dynamic-salmiakki-7aaccb.netlify.app/
GitHub
GitHub - nnall/DevJobs-FEM
Contribute to nnall/DevJobs-FEM development by creating an account on GitHub.
30 Replies
Jochem
Jochem13mo ago
the last one contains references to the icons used for your dark mode toggle
Jochem
Jochem13mo ago
it's probable these three?
thethingisback
thethingisback13mo ago
yea they're the template-included sprites from 11ty.. when I instaleld aria-modal-dialog package , there were some 'moderate severity' errors it was having with 11ty, that I 'force' fixed, so I'm just gonna uninstall and reinstall 11ty now i think
thethingisback
thethingisback13mo ago
well it looks liek even uninstalling them, I'm still getting these "3 moderate severity venerabilities" in the terminal
Jochem
Jochem13mo ago
welcome to npm you'll have to evaluate each, and either mitigate them in your own code, or decide you can't use the package until the vulnerabilities are fixed
thethingisback
thethingisback13mo ago
darn, it was all working before I installed that aria-modal-dialog package the npm audit fix is pretty useless i guess?
Jochem
Jochem13mo ago
roll back to a commit before you installed it, delete node_modules and reinstall? it's really not, it just can't fix everything. Sometimes it'll try to find other versions that still fit your dependencies, and sometimes that works, but a lot of the time the advisories will cover a lot of older versions and there's no resolution to your dependency tree that doesn't include the vulnerability it's a really, really strong argument to use as few packages as possible, and only use well maintained ones
thethingisback
thethingisback13mo ago
right, the aria one is pretty old ok, yea, i'll go back to a pre-install commit then
Jochem
Jochem13mo ago
remember your node_modules isn't in your repo, so you'll have to run npm install or potentially even remove it and then run npm install
thethingisback
thethingisback13mo ago
gotcha okay
thethingisback
thethingisback13mo ago
could not revert?
Jochem
Jochem13mo ago
it'll have edited index.njk to mark the conflict. manually edit it and follow the "after resolving" instructions make sure you resolve all the marked conflicts, there might be multiple
thethingisback
thethingisback13mo ago
so i used the resolve conflicts editor in vsc, went through all of the file differences and chose the version I wanted, and then after merging the changes into the one I want, VSC presented a "Commit" button in order to commit the changes directly, which I clicked, and now I'm seeing what looks to be a loading screen with a little dash that keeps flashing across the top
Jochem
Jochem13mo ago
check the git console
thethingisback
thethingisback13mo ago
Nothing changed there, still just same conflict message I got initially
thethingisback
thethingisback13mo ago
thethingisback
thethingisback13mo ago
oh wait scratch that, there's more I need to do
thethingisback
thethingisback13mo ago
I'm still seeing this other section of package.json and package-lock.json changes, though its not giving me an the option to open the 'resolve conflicts editor'
Jochem
Jochem13mo ago
what does git status say?
thethingisback
thethingisback13mo ago
ahh
thethingisback
thethingisback13mo ago
i guess that's the last step
Jochem
Jochem13mo ago
well, the diff is probably showing you what changed since the last commit if you just commit the changes you have now, it's probably fine?
thethingisback
thethingisback13mo ago
i think so.. It looks like so much I think because uninstalled 11ty and one of its plugins
thethingisback
thethingisback13mo ago
so trying to uninstall node, I've gone into my 'local' on my mac, and removed node from 'bin', 'include', and 'lib'. but when I check node -v, i'm still getting a version. Is there somewhere else I need to delete it?
thethingisback
thethingisback13mo ago
I ran the sudo rm -rf node command when I removed them
Jochem
Jochem13mo ago
make a new thread for that please, #os-and-tools for stuff like this. Also I have no idea about uninstalling node, I just use nvm and let that handle it all. also do not know how to set that up properly, I just google and follow the instructions
thethingisback
thethingisback13mo ago
gotcha ok thank you too btw Welp, just got done uninstalling and reinstalling node, npm. I Go to install my 11ty sprite dependency again, the one that kept giving me that 3 “moderate severity” errors message. And I go to install it again and again I get the same 3 moderate errors message
Jochem
Jochem13mo ago
they're not a mistake you're making, those are security warnings because you're using a package with security issues
thethingisback
thethingisback13mo ago
everything's working again, no more extra divs from the sprite inclusions.. I need to now 1. make sure my forms are aria-compliant, and 2. figure out how to go about actually using them as forms, in order to search my .json and populate my cards. Do you know of a good tutorial or information on how to do 2?
Jochem
Jochem13mo ago
No, sorry