📄Create the package.json
The package.json
file is a kind of manifest for your project. It can do a lot of things, it is also where npm stores the names and versions of all the installed packages that your project depends on.
How do I create the package.json
file?
package.json
file?Open the Terminal in your project's directory (Windows use: Shift+Right Button and click Open PowerShell) and type:
npm init -y

Putting dependencies in your package.json
package.json
Installing discord.js
To install, type in your Terminal
npm install discord.js
Your package.json
should look like this.
{
"name": "discloudbot",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"discord.js": "^14.0.3"
}
}
Last updated