Forking Discord.js

Hi, I needed to add some lines in discord.js package so I forked the repository and edited what I wanted, then replaced the discord.js version in package.json with the forked repo like this : "discord.js": "git+https://github.com/my-username/discord.js.git#main", I ran npm install and I got this error :
npm ERR! npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! npm ERR! Unsupported URL Type "workspace:": workspace:^
npm ERR! npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! npm ERR! Unsupported URL Type "workspace:": workspace:^
And after some researches I found that I should use yarn, so I ran yarn install, but the structure of the installed package is different from the official one, I found that the package is actually in discord.js/packages/discord.js, so some imports in other packages won't work. In conclusion, I need help using the forked package.
2 Replies
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Syjalo
Syjalo16mo ago
Google how to install packages in sub folders on GitHub. Not related to discord.js
Want results from more Discord servers?
Add your server