Skip to content

Initialize

Rose edited this page Mar 5, 2023 · 2 revisions

Initialize the Project:

npm and Node:

Run npm init to initialize the project with node and node_modules etc.

Package.json:

Go to the newly created package.json and make sure this start script is present:

"scripts": {
    "start": "node trshbot.js",
  }

While in the package.json make sure "type":"module" is present at the root of the JSON object.

Your package.json should look something like this:

{
  "type": "module",
  "name": "trsh_bot",
  "version": "1.0.0",
  "main": "trshbot.js",
  "scripts": {
    "start": "node trshbot.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": <your repo URL>
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": <your URL>
  },
  "homepage": <your homepage>,
  "description": ""
}

Back to Home

Clone this wiki locally