[Resolved] Issue: 'Error: Cannot find module ....' while package is already installed

I am running a Glitch Project (It’s a Discord Bot) and I have some packages who are great, but since yesterday, my bot is returning the same issue over and over again.

It tells me that the package is not installed, while it clearly is installed.
I tried to pnpm i -g pnpm and it returned an error instead of updating the pnpm system.
After that, I did pnpm rebuild and that worked… But it is still returning the same issue over and over again.

How can this be fixed?


Ask @Callum-OKaneif you need help with solving the same issue as me. He can fix this for you :wink:

2 Likes

Can you try running the following commands in your console in the order as follows:

rm shrinkwrap.yaml
enable-pnpm

Tell me if this makes any affect at all on the problem!

Mkay. Please wait a sec.

I did rm shrinkwrap.yaml in console and it returned: rm: cannot remove ‘shrinkwrap.yaml’: No such file or directory
I also did enable-pnpm and it restarted the project.

Still getting the same issues.

Can I be invited to the project to take a closer look please!

Tell me, what do you need to see? Do you have Discord? I can do a screenshare.

callumok2004#1234
Discord

Done. Now you only need to accept the request :smiley:

1 Like

The problem was that one of your npm modules were giving an error for unfound version, so I set the version for glitch to find to * and that fixed it, and now everything works!
If you have any more problems, do not hesitate to ask for help!

Happy glitching!