Androz2091 / discord-giveaways

🎉 Complete framework to facilitate the creation of giveaways using discord.js
https://discord-giveaways.js.org
MIT License
335 stars 127 forks source link

arghh help #354

Closed Aditya-coder379 closed 3 years ago

Aditya-coder379 commented 3 years ago

i tried to host it on heroku but when I type node index.js then it throws a error

Error: Cannot find module 'mongoose' 2021-08-13T02:56:40.394255+00:00 app[Worker.1]: Require stack: 2021-08-13T02:56:40.394255+00:00 app[Worker.1]: - /app/index.js 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15) 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:745:27) 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Module.require (internal/modules/cjs/loader.js:961:19) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at require (internal/modules/cjs/helpers.js:92:18) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Object. (/app/index.js:10:18) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Module._compile (internal/modules/cjs/loader.js:1072:14) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Module.load (internal/modules/cjs/loader.js:937:32) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:778:12) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) { 2021-08-13T02:56:40.394259+00:00 app[Worker.1]: code: 'MODULE_NOT_FOUND', 2021-08-13T02:56:40.394259+00:00 app[Worker.1]: requireStack: [ '/app/index.js' ]

but I installed mongoose but idk why it shows this error on heroku

Dragonizedpizza commented 3 years ago

.

reinacchi commented 3 years ago

i tried to host it on heroku but when I type node index.js then it throws a error

Error: Cannot find module 'mongoose' 2021-08-13T02:56:40.394255+00:00 app[Worker.1]: Require stack: 2021-08-13T02:56:40.394255+00:00 app[Worker.1]: - /app/index.js 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15) 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:745:27) 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Module.require (internal/modules/cjs/loader.js:961:19) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at require (internal/modules/cjs/helpers.js:92:18) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Object. (/app/index.js:10:18) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Module._compile (internal/modules/cjs/loader.js:1072:14) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Module.load (internal/modules/cjs/loader.js:937:32) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:778:12) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) { 2021-08-13T02:56:40.394259+00:00 app[Worker.1]: code: 'MODULE_NOT_FOUND', 2021-08-13T02:56:40.394259+00:00 app[Worker.1]: requireStack: [ '/app/index.js' ]

but I installed mongoose but idk why it shows this error on heroku

It cannot find any module called mongoose from the error shows. Did you have that specified on your package.json file?

Aditya-coder379 commented 3 years ago

I dont have package.json

Aditya-coder379 commented 3 years ago

i tried to host it on heroku but when I type node index.js then it throws a error Error: Cannot find module 'mongoose' 2021-08-13T02:56:40.394255+00:00 app[Worker.1]: Require stack: 2021-08-13T02:56:40.394255+00:00 app[Worker.1]: - /app/index.js 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15) 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:745:27) 2021-08-13T02:56:40.394256+00:00 app[Worker.1]: at Module.require (internal/modules/cjs/loader.js:961:19) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at require (internal/modules/cjs/helpers.js:92:18) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Object. (/app/index.js:10:18) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Module._compile (internal/modules/cjs/loader.js:1072:14) 2021-08-13T02:56:40.394257+00:00 app[Worker.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Module.load (internal/modules/cjs/loader.js:937:32) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:778:12) 2021-08-13T02:56:40.394258+00:00 app[Worker.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) { 2021-08-13T02:56:40.394259+00:00 app[Worker.1]: code: 'MODULE_NOT_FOUND', 2021-08-13T02:56:40.394259+00:00 app[Worker.1]: requireStack: [ '/app/index.js' ] but I installed mongoose but idk why it shows this error on heroku

It cannot find any module called mongoose from the error shows. Did you have that specified on your package.json file?

i dont have package.json because i am new to js

Aditya-coder379 commented 3 years ago

how can i make package json

reinacchi commented 3 years ago

I suggest you to learn some basics of JavaScript and NodeJS itself before going on Discord bots since this is very basic of js

Aditya-coder379 commented 3 years ago

I suggest you to learn some basics of JavaScript and NodeJS itself before going on Discord bots since this is very basic of js

yea ik basics but idk about package.json and ik python

reinacchi commented 3 years ago

package.json is the very basis of the very basic. Every NodeJS project should have them and this is not Python so referring to my previous comment.

Aditya-coder379 commented 3 years ago

package.json is the very basis of the very basic. Every NodeJS project should have them and this is not Python so referring to my previous comment.

yess

Aditya-coder379 commented 3 years ago

same issue

Aditya-coder379 commented 3 years ago

now i have package.json

Aditya-coder379 commented 3 years ago

but same error

Nico105 commented 3 years ago

https://devcenter.heroku.com/articles/deploying-nodejs read this or go to their support/just google things. we are not responsible for such things.