Closed haqqii closed 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')
Thanks @EdJoPaTo. Seems to be resolved, so closing. Any further questions - please go to GitHub Discussions
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'
}