NPM Modules cannot install

Hello!

I can’t seem to install npm modules on a glitch application I have. As I can seem this is a permissions error: https://i.mikosa.ga/Uu36 (Screenshot to the glitch console). I clearly cannot resolve this myself, but it’d be helpful if a Glitch Support Staff, can help me resolve this issue.
Help as soon as possible would be amazing, as this serves major downtime to my API and bot.

Kind Regards,
Ethan.

Hey @Cartar can you tell me a little about why you’re running npm i manually instead of adding discord.js in your project’s package.json file and letting Glitch handle the installation?

If you were to add that requirement to your package.json file Glitch should trigger the install automatically.

Hey @cori I did try doing the install from my package.json file but when I restarted my project, it didn’t see the change and skipped the part of when it should’ve been installing discord.js and tried booting up the bot process.
So I went to the console, like I normally do and ran npm i discord.js and it came up with the permissions error, so I then I also ran npm i which gave me the same permissions error.

Try using enable-pnpm in console, then use package.json to run your discord.js bot script. This should probably fix your problem.

2 Likes

Thank you very much! @NikkaNC This 100% Fixed my issue.

1 Like