Npm not installing node-telegram-bot-api - node.js

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'

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

Related

Ionic is not working well on server CentOS 7.99 after correct installation

I am getting frustrated because I can't make the approach I am searching for. I want to run an ionic server I've installed node, npm , angular, ionic, Cordova.
what's the error?
ionic start todo blank
System ask me if I want angular, I select angular, so, the system starts to run commands and it get stuck on
npm i --save -E #capacitor/core#latest
it gives me an error with post install script, this one specific:
> npm i
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated source-map-resolve#0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, whichis known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, whichis known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /root/ion_test/todo/node_modules/#angular/cli
npm ERR! command failed
npm ERR! command sh -c node ./bin/postinstall/script.js
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module '/root/ion_test/todo/node_modules/#angular/cli/bin/postinstall/script.js'
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm ERR! at node:internal/main/run_main_module:17:47 {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: []
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-01-28T17_51_13_147Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Please I need help, the server will be launching this in 7 days, I was wondering how can I solve this error and run ionic start and ionic serve with no errors.
Sounds like your Angular install is either borked or outdated, or there's a mismatch between the Angular version and Ionic. Try npm install -g #angular/cli#latest and see if that helps. If not, post your Angular version and your package.json.

Expo-cli installing halts with error npm ERR! cb() never called

I tried installing expo-cli but unfortunately it halted with the errors below.
freduah#freduah:~$ npm install -g expo-cli
npm WARN deprecated graphql-tools#3.0.0: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as #graphql-tools/schema, #graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/freduah/.npm/_logs/2021-09-28T14_47_55_893Z-debug.log
freduah#freduah:~$
I tried to report it to the npm community but the community was no longer
If you are in windows, add/allow NodeJS JavaScript Runtime through firewall in your network.

Error when running "npm install -g #vue/cli", reinstall attempted many times

I have been stuck on this for a long time. When i run npm install -g #vue/cli, it pops up the following error. simliar error occurs also when I run vue create project-name. I have tried reinstall many times and I have tried clean the cache as well. I am clear that the dictionary in the error " C:\Users\zhang\node_modules.bin/../node/bin/node" does not exist, but i have no idea how to fix it.
C:\Users\zhang>npm install -g #vue/cli
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm ERR! code 127
npm ERR! path C:\Users\zhang\AppData\Roaming\npm\node_modules\#vue\cli\node_modules\core-js-pure
npm ERR! command failed
npm ERR! command D:\Program Files\git\bin\bash.exe -c node -e "try{require('./postinstall')}catch(e){}"
npm ERR! /c/Users/zhang/node_modules/.bin/node: line 8: C:\Users\zhang\node_modules\.bin/../node/bin/node: No such file or directory
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zhang\AppData\Local\npm-cache\_logs\2021-05-02T21_16_30_121Z-debug.log
I have been stuck on this for hours and I appreciate any help from you
Thank you !
The WARNs is not an issue.
It did fail to run node binaries.
npm ERR! /c/Users/zhang/node_modules/.bin/node: line 8: C:\Users\zhang\node_modules\.bin/../node/bin/node: No such file or directory
Make sure you get the right path. Or change the env PATH variable accordingly.
please follow any of these to avoid these
1.sett the Environment path correctly
2.make sure that current user has the permission to process the data
ls -la /usr/lib/node_modules
whoami
sudo chown -R $USER /usr/lib/node_modules(setting the permission to current user)
3.Install the npm as sudo user by
sudo npm i -g #vue/cli

npm install windows-build-tools failed this is probably harmless

$ set "PYTHON_MIRROR=http://npm.taobao.org/mirrors/python" && npm install --global --production windows-build-tools
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
> windows-build-tools#5.2.2 postinstall D:\Program Data\nodejs\node_modules\windows-build-tools
> node ./dist/index.js
Downloading python-2.7.15.amd64.msi
[> ] 0.0% (0 B/s)
Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\spiri\.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
[> ] 0.0% (0 B/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\spiri\.windows-build-tools\vs_BuildTools.exe.
Starting installation...
AssignProcessToJobObject: (87) The parameter is incorrect.
npm WARN rollback Rolling back windows-build-tools#5.2.2 failed (this is probably harmless): EBUSY: resource busy or locked, rmdir 'D:\Program Data\nodejs\node_modules\windows-build-tools'
npm ERR! code ELIFECYCLE
npm ERR! errno 2147483651
npm ERR! windows-build-tools#5.2.2 postinstall: `node ./dist/index.js`
npm ERR! Exit status 2147483651
npm ERR!
npm ERR! Failed at the windows-build-tools#5.2.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\spiri\AppData\Roaming\npm-cache\_logs\2020-07-28T15_16_17_617Z-debug.log
This error still occurs when using powershell
Nodejs installed using nvm-windows,but this problem also occurs when installed through the official website
This is due to nvm-windows is not installed in the C drive caused by the installation of other locations will lead to no permission to deal with, so use the default installation can be

I am creating an Node.js app and I need to install ejs but I am unable to install it. It is showing me the following error

node --harmony ./postinstall.js
'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN #react-navigation/core#3.7.5 requires a peer of react#* but
none is installed. You must install peer dependencies yourself.
npm WARN react-native-safe-area-view#0.14.9 requires a peer of react#*
but none is installed. You must install peer dependencies yourself.
npm WARN react-native-safe-area-view#0.14.9 requires a peer of
react-native#* but none is installed. You must install peer
dependencies yourself.
npm WARN react-navigation#4.3.7 requires a peer of react#* but none is
installed. You must install peer dependencies yourself.
npm WARN react-navigation#4.3.7 requires a peer of react-native#* but
none is installed. You must install peer dependencies yourself.
npm WARN ashutosh#1.0.0 No description
npm WARN ashutosh#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ejs#3.1.3 postinstall: node --harmony ./postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ejs#3.1.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!
C:\Users\Ashutosh\AppData\Roaming\npm-cache_logs\2020-05-22T23_26_50_117Z-debug.log
You need to have a path to NodeJS inside your environment variables list.
On some OS reboot might be needed to make this work.
Try reboot or reinstall NodeJS and then reboot.

Resources