Missing directories and files for installing npm

I am trying to install this module with npm i --save https://github.com/yagop/node-telegram-bot-api.git.

The reason I'm avoiding npm i --save node-telegram-bot-apiis because I need some recently added methods (like sendContact).

When I install, it is added to mine package.json, as expected:

"node-telegram-bot-api": "git+https://github.com/yagop/node-telegram-bot-api.git",

But when I try to run an application using this module, it says:

Error: Cannot find module './src/telegram'

Belting a little, it turned out that srcsome other directories were missing . Here is the result tree:

$ tree ./node_modules/node-telegram-bot-api 
./node_modules/node-telegram-bot-api
├── CONTRIBUTING.md
├── index.js
├── LICENSE.md
├── node_modules
(second one is skipped)
├── package.json
├── README.hbs
└── README.md

Why? And how can I fix this?

I tried npm cache cleanand rm -rf ./node_modules/node-telegram-bot-apireinstalling nothing helps.

+4
1

, .nmpignore file, :

# lcov
coverage/
*.log
.package.json

# artifacts & source
README.hbs
output.md
output/
src/
test/
examples/
lib-doc/

# dotfiles
.travis.yml
.eslintrc
.eslintignore
.editorconfig
.babelrc
.gitignore
.git

, , . :

cd ./node_modules
git clone https://github.com/yagop/node-telegram-bot-api
cd ./node_modules/node-telegram-bot-api
npm install

.: (imho) . sinopia.

+5

Source: https://habr.com/ru/post/1660559/


All Articles