$ 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
Related
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
When I first tried to install puppeteer through npm, I got errors saying permission is denied for the .local-chromium folder. So I followed this SO post and that error went away, but now there is another (base path is omitted):
$ sudo npm install puppeteer --unsafe-perm=true
> puppeteer#5.2.1 install ##########/node_modules/puppeteer
> node install.js
(node:25349) ExperimentalWarning: The fs.promises API is experimental
Downloading Chromium r782078 - 126.4 Mb [====================] 100% 0.0s
ERROR: Failed to set up Chromium r782078! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
{ [Error: EEXIST: file already exists, mkdir '##########/node_modules/puppeteer/.local-chromium/linux-782078']
errno: -17,
code: 'EEXIST',
syscall: 'mkdir',
path:
'##########/node_modules/puppeteer/.local-chromium/linux-782078' }
npm WARN notsup Unsupported engine for puppeteer#5.2.1: wanted: {"node":">=10.18.1"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: puppeteer#5.2.1
npm WARN notsup Unsupported engine for extract-zip#2.0.1: wanted: {"node":">= 10.17.0"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: extract-zip#2.0.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer#5.2.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer#5.2.1 install 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! ######/.npm/_logs/2020-07-30T16_32_37_096Z-debug.log
But that directory doesn't exist, nor does puppeteer at all within node_modules so I can't delete it and retry. I'm not sure what the installation is reffering to. Does anybody have any idea what it could mean?
Also, this is irrelevant but another concern is with the warnings saying that a node version >=10.18.1 is wanted and so 10.4.0 is unsupported, any ideas what's up with that as well?
I ended up using nvm to switch to the stable Node release (10.18.1) which resolved both the errors and the warnings. I guess there was some incompatibility with newer Node versions.
I am trying to follow the steps listed here but keep getting an error when trying to install shoutem-cli - $ npm install -g #shoutem/cli
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok#2.2.21 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok#2.2.21 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-08-24T13_20_31_973Z-debug.log
The log file can be found here.
If you need more info, please let me know.
I tried searching for these errors or common issues and had 0 luck so I'm not sure where to begin. Any help would be greatly appreciated.
Thanks!
UPDATE: After reading the answer below and asked to rerun I get this error:
npm WARN deprecated babel-preset-node7#1.5.0: Use https://github.com/babel/babel-preset-env instead.
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string#0.0.2: to-iso-string has been deprecated, use #segment/to-iso-string instead.
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/bin/shoutem -> /usr/local/lib/node_modules/#shoutem/cli/src/shoutem.js
> ngrok#2.2.17 postinstall /usr/local/lib/node_modules/#shoutem/cli/node_modules/ngrok
> node ./postinstall.js
ngrok - downloading binary https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
events.js:182
throw er; // Unhandled 'error' event
^
Error: EACCES: permission denied, open '/usr/local/lib/node_modules/#shoutem/cli/node_modules/ngrok/ngrok.zip'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok#2.2.17 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok#2.2.17 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! /root/.npm/_logs/2017-08-24T21_53_55_950Z-debug.log
This seems to be related to ngrok#2.2.21 postinstall script. Doing a quick investigation, there seems to be some Ubuntu related issues - here. From what I can tell it seems to be permission related. We'll try to find a working version and restrict our CLI semver until this is resolved, we've already published the new version of CLI which restricts ngrok to 2.2.17 in an effort to resolve this (CLI version 0.9.4 - just run again npm install -g #shoutem/cli). We're using ngrok to ease up connections between React Native packager on your development machine and your phone.
when i run ionic start test tabs,npm instanll have problem like this,any help?
npm install
✖ Running command - failed!
[ERROR] An error occurred while running npm install (exit code 1):
npm WARN deprecated object-keys#0.2.0: Please update to the latest object-keys
npm ERR! code EINTEGRITY
npm ERR! sha1-T2O+sOp19jQCqE4oWn6F3/ui6zY= integrity checksum failed when using sha1: wanted sha1-T2O+sOp19jQCqE4oWn6F3/ui6zY= but got sha1-dFJ7pj/QMynsq3vXPRxBzTZdl34=. (630908 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yeezy/.npm/_logs/2017-06-06T02_33_30_452Z-debug.log
When I was trying to deploy my node.js app (with both nodejitsu and heroku), I got the same errors with libxmljs.
> libxmljs#0.4.1 preinstall /root/tmp/tmp-31613c7bs0y8/build/package/node_modules/twilio/node_modules/libxmljs
> make node
make: scons: Command not found
make: *** [node] Error 127
npm http 200 https://registry.nodejitsu.com/css-stringify
npm http 200 https://registry.nodejitsu.com/css-parse
npm http 200 https://registry.nodejitsu.com/is-promise/-/is-promise-1.0.1.tgz
> libxmljs#0.4.1 preuninstall /root/tmp/tmp-31613c7bs0y8/build/package/node_modules/twilio/node_modules/libxmljs
> make clean
make: scons: Command not found
make: *** [clean] Error 127
npm http GET https://registry.nodejitsu.com/css-stringify/-/css-stringify-1.0.5.tgz
npm http GET https://registry.nodejitsu.com/css-parse/-/css-parse-1.0.4.tgz
npm WARN continuing anyway libxmljs#0.4.1 preuninstall: `make clean`
npm WARN continuing anyway Exit status 2
npm ERR! libxmljs#0.4.1 preinstall: `make node`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the libxmljs#0.4.1 preinstall script.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make node
npm ERR! You can get their info via:
npm ERR! npm owner ls libxmljs
npm ERR! There is likely additional logging output above.
npm ERR! System SunOS 5.11
npm ERR! command "node" "/opt/local/bin/npm" "install" "--loglevel=http"
npm ERR! cwd /root/tmp/tmp-31613c7bs0y8/build/package
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
As you can see, it is failing within libxmljs's 'make node' and 'make clean' as the command 'scons' is not found. I have libxmljs installed in my app's node_modules directory, and 'scons' is located at "/usr/local/bin/scons".
I believe I have to ensure that the location of scons is in the path for the make environment of libxmljs but I don't know how to do that. Any help would be appreciated!
UPDATE: Following the advice from this question (Fail to deploy node.js application to heroku) I added libxmljs to the dependencies in package.json and added node_modules/ to .gitignore, that way heroku could have a look at the dependencies and install them itself. However, the exact same error occurred, which leads me to believe the root of the problem is not with my local environment, but something larger regarding libxmljs?
I was able to resolve my problem, although it wasn't really specifically about libxmljs. I also used the 'twilio' node submodule in my app, but listed its version as '0.0.0' in dependencies. I guess twilio 0.0.0 used libxmljs which wouldn't install when deploying to heroku, so I updated the twilio version number to the actual current version, and everything's good to go!