Probleme lancement d'un bot dicord sur Heroku

Fermé
leoboeb79 - 25 févr. 2021 à 13:33
 leoboeb79 - 26 févr. 2021 à 12:25
voila le message d'erreur dans la consol sur heroku, j'ai fait la commande "npm index.js" et j'ai eu ce resultat :


Usage: npm <command>

where <command> is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, fund, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami

npm <command> -h quick help on <command>
npm -l display full usage info
npm help <term> search for help on <term>
npm help npm involved overview

Specify configs in the ini-formatted file:
/app/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@6.14.11 /app/.heroku/node/lib/node_modules/npm
A voir également:

1 réponse

jordane45 Messages postés 38144 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 21 avril 2024 4 650
25 févr. 2021 à 17:25
Déjà... Bonjour ! ( si si .. on commence par ça ici ! )

Ensuite, je ne fais pas de node ...
mais une très rapide recherche sur le net me fait dire que :

Tu dois avoir un fichier package.json
Dans lequel doit se trouver
"scripts": {
  "start": "node index.js"
},

et donc, que la bonne commande à lancer .. c'est tout simplement
 npm start



1
Bonjour, je vous fait parvenir mon code qui est dans le fichier package.json
Je signale que j'ai deja fait un bot et il fonctionne correctement.
Merci d'avance

{
"name": "welcom",
"version": "2.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"discord.js": "^12.5.1",
"dotenv": "^8.2.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nfcpsnbourgeois/botdiscordeliot.git"
},
"author": "********",
"license": "ISC",
"bugs": {
"url": "https://github.com/nfcpsnbourgeois/botdiscordeliot/issues"
},
"homepage": "https://github.com/nfcpsnbourgeois/botdiscordeliot#readme"
}
0