-
-
Notifications
You must be signed in to change notification settings - Fork 87
Node.js 16 on replit
Sintya edited this page Oct 25, 2021
·
1 revision
Steps:
- Execute this script on the shell to install node (you can choose the version by editing the number 16) and configure npm.
npm init -y && npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH
- Create the
.replit
to execute node from the shell instead of the console.
run="npm start"
- Make sure to add the start script in your package.json file
"scripts": {
"start": "node ."
}
- (Optional) If you had packages like canvas or sqlite before, you need to re-install those packages
npm uninstall canvas && npm i canvas
DGH BOT