Error: Module did not self-register
I'm getting this error when I run my tests for some reason, how can I solve this?
5 Replies
not sure if it's relevant but I'm using vitest and I'm on macOS (apple silicon)
I already tried reinstalling node_modules, still the same error
1. Did you install xcode command line tools? https://www.freecodecamp.org/news/install-xcode-command-line-tools/
2. NodeJS version?
yep, it's a strange issue, it works just fine if I delete the
dist
directory (currently using this as workaround) and I'm on LTS v18.17.1I think I've seen the error before but I really don't remember what it was
FWIW I have a MacBook with an M1 chip and bots work just fine there
yeah, it's just when I have the source code compiled + run tests with vitest that it gives me that error 🤔
running with node works perfectly fine, thanks anyway tho