S4D Guide
Updating Replit to v16
First you need to install discord.js 13v by doing this in shell!
npm i discord.js@latest
Installing NodeJS 16v on Replit
Discord.JS v13 requires NodeJS v16 or newer
On replit got to shell tab to execute the command.
Not in Console.
npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH
After you are done with this,
Execute this to clean npm cache and reinstall the package in the shell
rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm cache clean --force && npm i
run="npm start"
Make sure to add the start script and other scripts in your package.json file
"scripts": {
"start": "node .",
"node-update": "npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH",
"node-clean": "rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm cache clean --force && npm i"
}

This is how a normal (without extra packages should look).
After Completing these steps,
You need to export your code and copy everything the premade code too and put in your main file.
To start your bot you need to enter this this in shell and press enter.
node .
After this your bot will start!
Have Fun making commands!!
For help 👇
Ask in help and support channel s4d Community Server
Last updated
Was this helpful?