RealSpeaker / telegraf-session-local

Telegraf local sessions middleware with multiple supported storage types (Memory/FileSync/FileAsync/...) using lowdb
https://git.io/v7iw9
MIT License
93 stars 10 forks source link

can't find module telegraf-session #132

Closed haqqii closed 3 years ago

haqqii commented 3 years ago

C:\Users\ASUS\ocr-bot>node main.js internal/modules/cjs/loader.js:438 throw e; ^

Error: Cannot find module 'C:\Users\ASUS\ocr-bot\node_modules\telegraf\session' at createEsmNotFoundErr (internal/modules/cjs/loader.js:907:15) at finalizeEsmResolution (internal/modules/cjs/loader.js:900:15) at resolveExports (internal/modules/cjs/loader.js:432:14) at Function.Module._findPath (internal/modules/cjs/loader.js:472:31) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27) at Function.Module._load (internal/modules/cjs/loader.js:725:27) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (C:\Users\ASUS\ocr-bot\main.js:2:17) at Module._compile (internal/modules/cjs/loader.js:1063:30) { code: 'MODULE_NOT_FOUND', path: 'C:\Users\ASUS\ocr-bot\node_modules\telegraf\package.json' }

EdJoPaTo commented 3 years ago

You are trying to use the session of the npm package of telegraf which is not this library. You probably want to use const {session} = require('telegraf')

TemaSM commented 3 years ago

Thanks @EdJoPaTo. Seems to be resolved, so closing. Any further questions - please go to GitHub Discussions