Hi. I'm getting this error when I want to run the bot.
Error: Cannot find module 'telegram-api/types/Message'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/mamal/Projects/Others/TLBot/main.js:1:37)
at Module._compile (module.js:460:26)
at normalLoader (/home/mamal/Projects/Others/TLBot/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:166:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/mamal/Projects/Others/TLBot/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:179:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/mamal/Projects/Others/TLBot/index.js:2:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
It's the line 1 of main.js
importBotfrom'telegram-api/build';
I already installed dependencies. Also the Message.js file is present in the build/types folder.
Hi. I'm getting this error when I want to run the bot.
```
Error: Cannot find module 'telegram-api/types/Message'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/mamal/Projects/Others/TLBot/main.js:1:37)
at Module._compile (module.js:460:26)
at normalLoader (/home/mamal/Projects/Others/TLBot/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:166:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/mamal/Projects/Others/TLBot/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:179:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/mamal/Projects/Others/TLBot/index.js:2:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
```
It's the line 1 of main.js
``` js
import Bot from 'telegram-api/build';
```
I already installed dependencies. Also the Message.js file is present in the build/types folder.
Okay, it seems there was a problem with npm not publishing types folder anymore, edited the files property of package.json and it's fixed now, Thanks @mamal72! <3
Okay, it seems there was a problem with npm not publishing `types` folder anymore, edited the `files` property of package.json and it's fixed now, Thanks @mamal72! <3
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi. I'm getting this error when I want to run the bot.
It's the line 1 of main.js
I already installed dependencies. Also the Message.js file is present in the build/types folder.
This is an issue with older versions of
telegram-api, it's fixed in the latest version, what version are you on?Okay, it seems there was a problem with npm not publishing
typesfolder anymore, edited thefilesproperty of package.json and it's fixed now, Thanks @mamal72! <3