Closed rampd2 closed 6 years ago
You might want to update you nodejs version, you can check the version with node -v
in the console.
Thanks for your VERYY fast answer. I try it...
v4.2.6
well, there we have the problem, update nodejs to anything >=8
I did install this on a "new" Ubuntu Server.
sudo apt-get update
sudo apt-get upgrade
???
just follow their update/install routine: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Thx.
Ou, No:
server@server1:~/Discord-guild-copy$ sudo npm install
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/hydrabolt/discord.js.git /home/server/.npm/_cacache/tmp/git-clone-b74ec7f6
npm ERR! /home/server/.npm/_cacache/tmp/git-clone-b74ec7f6/.git: Keine Berechtigung
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /home/server/.npm/_logs/2018-04-09T20_38_37_002Z-debug.log
server@server1:~/Discord-guild-copy$ node copy.js
module.js:549
throw err;
^
Error: Cannot find module 'discord.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/server/Discord-guild-copy/copy.js:2:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
server@server1:~/Discord-guild-copy$
It seems Discord.js is missing??
check if node and npm are updated already with node -v
and npm -v
and delete the existing node_modules
folder before (sudo) npm install
Node: v8.11.1
npm: 5.6.0
Yes, i deleted the whole git clone folder an cloned again and setted up again(settings.json).
should work just fine with those versions
It wont work after retry:
server@server1:~$ git clone https://github.com/Jisagi/Discord-guild-copy.git
Klone nach 'Discord-guild-copy' ...
remote: Counting objects: 65, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 65 (delta 1), reused 6 (delta 0), pack-reused 52
Entpacke Objekte: 100% (65/65), Fertig.
Prüfe Konnektivität ... Fertig.
server@server1:~$ cd Discord-guild-copy/
server@server1:~/Discord-guild-copy$ ls
copy.js LICENSE objects package.json README.md settings.json
server@server1:~/Discord-guild-copy$ sudo nano settings.json
server@server1:~/Discord-guild-copy$ sudo npm install
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/hydrabolt/discord.js.git /home/server/.npm/_cacache/tmp/git-clone-84d92bc5
npm ERR! /home/server/.npm/_cacache/tmp/git-clone-84d92bc5/.git: Keine Berechtigung
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /home/server/.npm/_logs/2018-04-09T20_46_48_846Z-debug.log
server@server1:~/Discord-guild-copy$ sudo node copy.js
module.js:549
throw err;
^
Error: Cannot find module 'discord.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/server/Discord-guild-copy/copy.js:2:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
server@server1:~/Discord-guild-copy$
but i will try tomorrow. thx
judging from your console output you are german. there are a few isps there which have DNS problems right now, might be related since it cant find the dependencies and therefore says it cant find the modules
äähm, ich könnte schon die ganze Zeit mir dir Deutsch sprechen. DNS Probleme? Kann gut sein.
Also, hats jetzt geklappt, oder macht npm immer noch Probleme? Ansonsten kann man das Issue schließen.
Ich bin gerade am alles von vorne neu installieren.
Ich habe mit sudo apt-get purge nodejs npm
die beiden deinstalliert.
After this i removed with sudo rm -r Discord-guild-copy
the Project Folder.
I downloaded it again with git clone https://github.com/Jisagi/Discord-guild-copy.git
.
I adjusted the settings.json.
Ich führte den Befehl npm install im Discord-guild-copy Verzeichniss aus, mit folgender Ausgabe:
server@server1:~/Discord-guild-copy$ sudo npm install
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/hydrabolt/discord.js.git /home/server/.npm/_cacache/tmp/git-clone-3ea43d47
npm ERR! /home/server/.npm/_cacache/tmp/git-clone-3ea43d47/.git: Keine Berechtigung
npm ERR!
╭─────────────────────────────────────╮
│ │
│ Update available 5.6.0 → 5.8.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯
npm ERR! A complete log of this run can be found in:
npm ERR! /home/server/.npm/_logs/2018-04-11T17_46_46_010Z-debug.log
This seems like an Error!?
And i proceedet with node copy.js
and the followed result:
server@server1:~/Discord-guild-copy$ node copy.js
module.js:549
throw err;
^
Error: Cannot find module 'discord.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/server/Discord-guild-copy/copy.js:2:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Thanks for deine Antwort.
server@server1:~/Discord-guild-copy$ sudo npm install
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/hydrabolt/discord.js.git /home/server/.npm/_cacache/tmp/git-clone-3ea43d47
npm ERR! /home/server/.npm/_cacache/tmp/git-clone-3ea43d47/.git: Keine Berechtigung
npm ERR!
This explains it, just read what it says. You dont have enouhg permissions in that folder to use npm. That's a problem on your side.
But i sudoed it?! Should i do chmod 777 /home/server/.npm/_cacache/tmp/git-clone-3ea43d47/ ?
Ups, now it worked, to install (npm install
) the Project.
But, now it says:
Successfully logged in as Ctrl+C#2286. Starting script.
Error: Original guild to copy does not exist. Please check if the id in the settings is correct and if the bot is also member of this guild.
What did i wrong, i did it like here:
i cant really help you with this, that something you have to fix yourself.
I forgot to invite my copy Bot to the OriginalGuild.
It worked VERY NICE.
Thank You Very Much. 👍 DANKE VIEL MAL!! 👍 🥇
MySettings.json:
I made on the New Guild a Role with the Name: "guildcopy" I renewed my ^ Token ^!
MyOutput: