4
我正在尝试安装this module和npm i --save https://github.com/yagop/node-telegram-bot-api.git
。npm install上缺少目录和文件
我避免npm i --save node-telegram-bot-api
的原因是我需要一些最近添加的方法(如sendContact
)。
当我安装,它加入到我的package.json
预期:
"node-telegram-bot-api": "git+https://github.com/yagop/node-telegram-bot-api.git",
但是当我尝试运行正在使用该模块,它说的应用:
Error: Cannot find module './src/telegram'
附近有一座小戳后事实证明,缺少src
和其他一些目录。这里是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
为什么?我该如何解决它?
我试图npm cache clean
和rm -rf ./node_modules/node-telegram-bot-api
,重新安装,没有什么帮助。
谢谢!这说得通。顺便说一句,你为什么认为这是适当的使用私人注册表?你能澄清吗?谢谢 –
@RomanPushkin因为在这种情况下,你可以通过git仓库透明地自动执行更新包。并且不要等待来自'npmjs.com'的升级包。 –