galnir / Master-Bot

A Discord music bot and dashboard with slash commands, playlist support, Spotify, music quiz, saved playlists, lyrics, gifs and more
MIT License
464 stars 372 forks source link

pnpm i fails #800

Closed Natemo2625 closed 1 year ago

Natemo2625 commented 1 year ago

I just made a fresh clone and followed readme, but I always get Failed in 650ms at /home/natemo/Master-Bot/node_modules/.pnpm/turbo@1.10.12/node_modules/turbo ELIFECYCLE  Command failed with exit code 1. I have made sure to make a postgresql user with permissions beforehand so it's not that this time

Edit: this is in an Ubuntu 23.04 VM, but with direct internet connection through a USB wireless adapter

Bacon-Fixation commented 1 year ago

Howdy @Natemo2625

I apologize for the delay, I made an Ubuntu 23.04 VM (VirtualBox) and replicated a fresh install, there were a couple of issues that came up. There is a quirk with permissions where Ubuntu doesn't seem to let you alter/create folders and files, unless you do sudo in certain situations and Turbo V1.10.12 installation script is bugged for Ubuntu users specifically node 18.

Edit - i tried again but with Nodejs v20 instead and sudo pnpm install and sudo pnpm dev, and it installed and ran without needing to alter scripts Changing the Turbo version to turbo@1.10.13 in ./package.json and then running sudo pnpm install got me past the installation error, then run sudo pnpm dev

If you run into ERROR: "watch" exited with 1 when running sudo pnpm dev, open up ./apps/bot/package.json and replace line 13 to "dev": "pnpm build && pnpm copy-scripts && run-p start",

I hope this helps, I went ahead and did fresh installations with Debian 10 & 11, and Ubuntu 22 VM's as well, Debian doesn't show this behavior at all, and Ubuntu 22 still needs sudo to run the install and start scripts despite the users permissions

Much Love -Bacon

Natemo2625 commented 1 year ago

Thank you for the response @Bacon-Fixation I will try it out and see if this helps. I will also try it on a Debian VM to see if that helps as well.

Edit: did you happen to try it on Debian 12?

Bacon-Fixation commented 1 year ago

I did, Debian 12 seems to work just fine with node 18 and node 20 just like the other Debian versions, didn't need to stray from the README steps

Ubuntu 23 VM needed to use node 20 instead and run sudo pnpm install then sudo pnpm dev

Much Love -Bacon

Bacon-Fixation commented 1 year ago

Howdy @Natemo2625, just want to follow up with you and see if you are still having difficulties installing the dependencies

Much Love -Bacon

Natemo2625 commented 1 year ago

Oh my bad, I got busy, I'll try it momentarily

Natemo2625 commented 1 year ago

Ok I have time to try it now, will keep you updated

Natemo2625 commented 1 year ago

Ok it is working now, but apparently I can't get higher than NodeJS 18.13.0 on Debian 12, any ideas?

Bacon-Fixation commented 1 year ago

Howdy @Natemo2625

i just followed the steps listed here https://github.com/nodesource/distributions

i adjusted the commands for v18

uninstall nodejs v18.13.0

sudo apt-get purge nodejs &&\
rm -r /etc/apt/sources.list.d/nodesource.list &&\
rm -r /etc/apt/keyrings/nodesource.gpg

Download and import the Nodesource GPG key

sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

Create deb repository

NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

Run Update and Install

sudo apt-get update
sudo apt-get install nodejs -y

Check version

node -v

should give you v18.17.1

i hope this helps

Much Love -Bacon

Bacon-Fixation commented 1 year ago

Howdy @Natemo2625, just wanted to follow up with you and the issues you were having

Much Love -Bacon

Natemo2625 commented 1 year ago

Oh right I forgot to respond, it's all working now, thanks for all the help!