This is my code (minus my token):
This code worked completely fine about an hour ago, then suddenly it didn’t. I started randomly getting this error:
C:\Program Files\nodejs\node.exe .\index.js
Process exited with code 1
Uncaught Error: Cannot find module ‘Discord.js’
I have tried the following:
-Uninstalling discord.js, then reinstalling it.
-Checking to see if the ‘Discord’ should be capitalised or not.
-Changing the version on the ‘version’ of my package.json.
-Completely rewriting my code from scratch in a new file.
-Reducing the code to just that first line of code.
(Edit: I also tried running Visual Studio Code in administrator mode and I tried tweaking the code such that I provided an exact file location instead of just ‘discord.js’. Again, neither of these worked.)
None of these have worked. I am basically brand new to coding (hence the very simple code) and just fancied messing around with it, but I have genuinely no idea what caused my issue or how to fix it as I have checked everything I can think of.
Any ideas ?