Npm 没有安装 node-telegram-bot-api

Npm not installing node-telegram-bot-api

我的规格:

C:\Users\new>node -v
v14.17.1

C:\Users\new>npm -v
6.14.13

C:\Users\new>py -V
Python 3.9.5

C:\Users\new>cmd
Microsoft Windows [Version 10.0.19042.1052]
(c) Microsoft Corporation. All rights reserved.

Windows 32-Bit 我用 python 创建了很多电报机器人。我想用节点创建电报机器人。我尝试安装 node-telegram-bot-api 但 npm 没有安装它。这是这些日志:

F:\nodejs-telegram-bots\bot-1>npm i node-telegram-bot-api
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! code UNKNOWN
npm ERR! syscall open
npm ERR! path C:\Users\new\AppData\Roaming\npm-cache\_cacache\index-v5\e1\f666258647476fcd56918517f073f7a7586495b3bd3f1029a99ffca77596
npm ERR! errno -4094
npm ERR! UNKNOWN: unknown error, open 'C:\Users\new\AppData\Roaming\npm-cache\_cacache\index-v5\e1\f666258647476fcd56918517f073f7a7586495b3bd3f1029a99ffca77596'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\new\AppData\Roaming\npm-cache\_logs21-06-24T12_10_33_145Z-debug.log

我用过npm cache clean

F:\nodejs-telegram-bots\bot-1>npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR! 
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\new\AppData\Roaming\npm-cache\_logs21-06-24T12_42_29_100Z-debug.log

还有npm cache clean --force

F:\nodejs-telegram-bots\bot-1>npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
npm ERR! code UNKNOWN  
npm ERR! syscall unlink
npm ERR! path C:\Users\new\AppData\Roaming\npm-cache\_cacache\index-v5
npm ERR! errno -4094
npm ERR! UNKNOWN: unknown error, unlink 'C:\Users\new\AppData\Roaming\npm-cache\_cacache\index-v5'

检查免费 space 或权限。清理缓存也有帮助

linux 系统一切正常:

# npm i node-telegram-bot-api
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN Whosebug@1.0.0 No description
npm WARN Whosebug@1.0.0 No repository field.

+ node-telegram-bot-api@0.53.0
added 98 packages from 132 contributors and audited 98 packages in 10.391s

23 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities