node.jsnpmtelegram-botnode-telegram-bot-api

Npm not installing node-telegram-bot-api


My specifications:

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 I create a lot of telegram bots with python. I want to create telegram bot with node. I tried to install node-telegram-bot-api but npm is not installing that. Here are those logs:

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\f6\4466258647476fcd56918517f073f7a7586495b3bd3f1029a99ffca77596
npm ERR! errno -4094
npm ERR! UNKNOWN: unknown error, open 'C:\Users\new\AppData\Roaming\npm-cache\_cacache\index-v5\e1\f6\4466258647476fcd56918517f073f7a7586495b3bd3f1029a99ffca77596'

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

I have used 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\_logs\2021-06-24T12_42_29_100Z-debug.log

and also 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\25
npm ERR! errno -4094
npm ERR! UNKNOWN: unknown error, unlink 'C:\Users\new\AppData\Roaming\npm-cache\_cacache\index-v5\25'

Solution

  • Check free space or permissions. Cleaning cache also can helps

    Everything work on linux system :

    # 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 stackoverflow@1.0.0 No description
    npm WARN stackoverflow@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