0
votes

When I try to start my discord bot with "npm start" it says

C:\Users\yazan\Desktop\Discord bot\index.js:92 app.listen(app.get('port'), function() { ^ ReferenceError: app is not defined> at Object. (C:\Users\yazan\Desktop\Discord bot\index.js:92:1) at Module._compile (internal/modules/cjs/loader.js:736:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:747:10) at Module.load (internal/modules/cjs/loader.js:628:32) at tryModuleLoad (internal/modules/cjs/loader.js:568:12) at Function.Module._load (internal/modules/cjs/loader.js:560:3) at Function.Module.runMain (internal/modules/cjs/loader.js:801:12) at executeUserCode (internal/bootstrap/node.js:526:15) at startMainThreadExecution (internal/bootstrap/node.js:439:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\yazan\AppData\Roaming\npm-cach

I expected it to start, sorry I'm a beginner.

1

1 Answers

1
votes

As the error said: You call a Variable app which is not defined at all or in this scope. Recheck if you set it, it has another name(typo, etc.) or is undefined. And please, it would be really helpful if you provide code when asking for help. We can't see what you've done if you don't show us.