I recently downloaded and installed Telegraf - telegram bot api. It works with Node.js. I looked at 17 sites, including github, and did not find a solution for myself.
Here is the error:
node .\src\bot.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'C:\Projects\Telegram\src\bot.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
And my code for bot.js:
const Telegraf = require('telegraf')
const bot = new Telegraf(process.env.BOT_TOKEN)
bot.start((ctx) => ctx.reply('Welcome!'))
bot.launch()
My system: Windows 10 64bit
IDE: Visual Studio Code 1.38.1
Node version: 10.16.3
Npm version: 6.11.3
Please do not give me links to the solution found from Google. I tried it over 100 times. If you understand, help me. Thanks