Sank6 / Discord-Bot-List

Just another botlist for discord
GNU General Public License v3.0
212 stars 184 forks source link

Error #76

Closed SwitchAlpha closed 4 years ago

SwitchAlpha commented 4 years ago

internal/modules/cjs/loader.js:336 throw err; ^

Error: Cannot find module 'C:\Users\root\Desktop\botlist\node_modules\klasa\dist\src\index.js'. Please verify that the package.json has a valid "main" entry at tryPackage (internal/modules/cjs/loader.js:328:19) at Function.Module._findPath (internal/modules/cjs/loader.js:689:18) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1016:27) at Function.Module._resolveFilename (C:\Users\root\Desktop\botlist\node_modules\module-alias\index.js:49:29) at Function.Module._load (internal/modules/cjs/loader.js:898:27) at Module.require (internal/modules/cjs/loader.js:1089:19) at require (internal/modules/cjs/helpers.js:73:18) at Object. (C:\Users\root\Desktop\botlist\src\bot\index.js:2:28) at Module._compile (internal/modules/cjs/loader.js:1200:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10) at Module.load (internal/modules/cjs/loader.js:1049:32) at Function.Module._load (internal/modules/cjs/loader.js:937:14) at Module.require (internal/modules/cjs/loader.js:1089:19) at require (internal/modules/cjs/helpers.js:73:18) at Object. (C:\Users\root\Desktop\botlist\src\index.js:6:13) at Module._compile (internal/modules/cjs/loader.js:1200:30) { code: 'MODULE_NOT_FOUND', path: 'C:\Users\root\Desktop\botlist\node_modules\klasa\package.json', requestPath: 'klasa' }

Zaid-maker commented 4 years ago

You have verify your main file name in the package.json file

On Sun, 31 May 2020, 9:06 pm Kyhn Ylcn, notifications@github.com wrote:

internal/modules/cjs/loader.js:336 throw err; ^

Error: Cannot find module 'C:\Users\root\Desktop\botlist\node_modules\klasa\dist\src\index.js'. Please verify that the package.json has a valid "main" entry at tryPackage (internal/modules/cjs/loader.js:328:19) at Function.Module._findPath (internal/modules/cjs/loader.js:689:18) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1016:27) at Function.Module._resolveFilename (C:\Users\root\Desktop\botlist\node_modules\module-alias\index.js:49:29) at Function.Module._load (internal/modules/cjs/loader.js:898:27) at Module.require (internal/modules/cjs/loader.js:1089:19) at require (internal/modules/cjs/helpers.js:73:18) at Object. (C:\Users\root\Desktop\botlist\src\bot\index.js:2:28) at Module._compile (internal/modules/cjs/loader.js:1200:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10) at Module.load (internal/modules/cjs/loader.js:1049:32) at Function.Module._load (internal/modules/cjs/loader.js:937:14) at Module.require (internal/modules/cjs/loader.js:1089:19) at require (internal/modules/cjs/helpers.js:73:18) at Object. (C:\Users\root\Desktop\botlist\src\index.js:6:13) at Module._compile (internal/modules/cjs/loader.js:1200:30) { code: 'MODULE_NOT_FOUND', path: 'C:\Users\root\Desktop\botlist\node_modules\klasa\package.json', requestPath: 'klasa' }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Sank6/Discord-Bot-List/issues/76, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXTCNCXCUMXK72VWLZAXZLRUJ57PANCNFSM4NPG6RQQ .

SwitchAlpha commented 4 years ago

how ?

Zaid-maker commented 4 years ago

main index.js or whatever you name it

SwitchAlpha commented 4 years ago

in package.json have this "main": "src/index.js",

SwitchAlpha commented 4 years ago

but same error

SwitchAlpha commented 4 years ago

@Zaid-maker can you help me ?

Zaid-maker commented 4 years ago

you have to add this to ./src/index.js

On Mon, 1 Jun 2020 at 13:53, Kyhn Ylcn notifications@github.com wrote:

@Zaid-maker https://github.com/Zaid-maker can you help me ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sank6/Discord-Bot-List/issues/76#issuecomment-636711110, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXTCNBBKYUTPWNMFFZLOR3RUNUA7ANCNFSM4NPG6RQQ .

SwitchAlpha commented 4 years ago

@Zaid-maker { "name": "discordbotlist", "version": "3.0.0", "description": "A discord bot list.", "main": "./src/index.js", "scripts": { "start": "node src/index.js" }, "dependencies": { "body-parser": "1.19.0", "btoa": "^1.2.1", "canvas": "^2.6.1", "canvas-constructor": "kyranet/CanvasConstructor", "colors": "^1.4.0", "cookie-parser": "^1.4.4", "discord.js": "github:discordjs/discord.js#master", "dotenv": "^8.2.0", "ejs": "^3.0.1", "express": "^4.16.3", "is-html": "^2.0.0", "is-url": "1.2.4", "klasa": "github:dirigeants/klasa#master", "module-alias": "^2.2.2", "mongoose": "^5.9.10", "node-fetch": "^2.6.0", "node-pre-gyp": "^0.14.0", "showdown": "^1.9.1", "unirest": "^0.6.0" }, "engines": { "node": "12.x" }, "_moduleAliases": { "@root": ".", "@bot": "./src/bot", "@utils": "./src/utils", "@routes": "./src/routes", "@models": "./src/models", "@structures": "./src/structures" } }

this is right ?

Sank6 commented 4 years ago

Make sure you run node src/index.js not npm start or node .