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:^


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.
Was this page helpful?