npm install now failed OSX 10.8 - node.js

As title states I cannot install 'nowjs' with npm on my OSX ML 10.8.
Before to make anyone shout out :) I have xCode installed AND command line utilities.
These are lines from npm-log with error messages.
334 verbose true,/Volumes/Macintosh HD2/Library/Node/TestExpress/node_modules,/Volumes/Macintosh HD2/Library/Node/TestExpress/node_modules unbuild now#0.8.1
335 info postuninstall now#0.8.1
336 error node-proxy#0.6.0 install: `node-gyp configure build`
336 error `sh "-c" "node-gyp configure build"` failed with 1
337 error Failed at the node-proxy#0.6.0 install script.
337 error This is most likely a problem with the node-proxy package,
337 error not with npm itself.
337 error Tell the author that this fails on your system:
337 error node-gyp configure build
337 error You can get their info via:
337 error npm owner ls node-proxy
337 error There is likely additional logging output above.
338 error System Darwin 12.2.0
339 error command "node" "/usr/local/bin/npm" "install" "now"
340 error cwd /Volumes/Macintosh HD2/Library/Node/TestExpress
341 error node -v v0.8.14
342 error npm -v 1.1.65
343 error code ELIFECYCLE
344 verbose exit [ 1, true ]
Anyone can point me to the righr direction please?

Sometimes node-proxy (so in this case nowjs), needs to be installed with sudo.

Related

Installing npm sharp module on Ubuntu failed

I faced issue while was trying to install sharp module on ubuntu server.
I tried to install it to my project folder but had no success there.
I had a guess that this might happen due to some conflicts with current modules. After that I tried to install it to the new folder with no modules in it, but result was the same.
The issue flow is next. I try to install sharp module, then it stuck in this state (I waited for around an hour and nothing changed).
(##################) ⠼ reify:sharp: timing reifyNode:node_modules/semver Completed in 145ms
After that I pressed ctrl+c and here is the error that I got
root#ubuntu-front:/var/tmp/tes# npm i sharp
npm ERR! path /var/tmp/tes/node_modules/sharp
npm ERR! command failed
npm ERR! signal SIGINT
npm ERR! command sh /tmp/install-4252fa98.sh
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.13.2/libvips-8.13.2-linux-x64.tar.br
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-10-12T12_56_38_692Z-debug-0.log
And here is output from the dump file
288 info run sharp#0.31.1 install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
289 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 275ms
290 timing auditReport:getReport Completed in 278ms
291 silly audit report {}
292 timing auditReport:init Completed in 0ms
293 timing reify:audit Completed in 279ms
294 info run sharp#0.31.1 install { code: null, signal: 'SIGINT' }
295 timing reify:rollback:createSparse Completed in 34ms
296 timing reify:rollback:retireShallow Completed in 0ms
297 timing command:i Completed in 21196ms
298 verbose stack Error: command failed
298 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/lib/index.js:63:27)
298 verbose stack at ChildProcess.emit (node:events:513:28)
298 verbose stack at maybeClose (node:internal/child_process:1093:16)
298 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
299 verbose pkgid sharp#0.31.1
300 verbose cwd /var/tmp/tes
301 verbose Linux 5.15.0-48-generic
302 verbose node v16.17.0
303 verbose npm v8.15.0
304 error path /var/tmp/tes/node_modules/sharp
305 error command failed
306 error signal SIGINT
307 error command sh /tmp/install-4252fa98.sh
308 error sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.13.2/libvips-8.13.2-linux-x64.tar.br
309 verbose exit 1
310 timing npm Completed in 21266ms
311 verbose unfinished npm timer reify 1665579398761
312 verbose unfinished npm timer reify:build 1665579400052
313 verbose unfinished npm timer build 1665579400052
314 verbose unfinished npm timer build:deps 1665579400052
315 verbose unfinished npm timer build:run:install 1665579400057
316 verbose unfinished npm timer build:run:install:node_modules/sharp 1665579400057
317 verbose code 1
318 error A complete log of this run can be found in:
318 error /root/.npm/_logs/2022-10-12T12_56_38_692Z-debug-0.log
I found some similar issues in the Internet but all of them were slightly different and suggested solutions didn't help in my case.
Here are the versions
# node -v
v16.17.0
# npm -v
8.15.0
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Cannot Install NPM Package - Code 128 An unknown git error occurred

I'm trying to install the package #truffle/hdwallet-provider .
As written in the doc, I'm running:
npm i #truffle/hdwallet-provider
Here is the error message I'm getting:
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git#github.com/ethereumjs/ethereumjs-abi.git
npm ERR! git#github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-03-08T14_13_15_122Z-debug-0.log
Here are the logs:
698 verbose Linux 5.13.0-30-generic
699 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "#truffle/hdwallet-provider"
700 verbose node v14.17.6
701 verbose npm v8.5.3
702 error code 128
703 error An unknown git error occurred
704 error command git --no-replace-objects ls-remote ssh://git#github.com/ethereumjs/ethereumjs-abi.git
705 error git#github.com: Permission denied (publickey).
705 error fatal: Could not read from remote repository.
705 error
705 error Please make sure you have the correct access rights
705 error and the repository exists.
706 verbose exit 128
707 timing npm Completed in 6266ms
708 verbose unfinished npm timer reify 1646748520075
709 verbose unfinished npm timer reify:loadTrees 1646748520084
710 verbose code 128
711 error A complete log of this run can be found in:
711 error /root/.npm/_logs/2022-03-08T14_08_39_958Z-debug-0.log
My node version:
v14.17.6
My NPM version:
v8.5.3
Actually, it's a well-known bug.
https://github.com/trufflesuite/truffle/issues/2852
Using this solved the problem:
npm i #truffle/hdwallet-provider#next
For other people coming here for the same bug with another package, check this SO post:
npm install error code 128
Try npm config set legacy-peer-deps true, that worked for me.

npm install, node-gyp rebuild error

I'm just starting out working with node.js and when I try npm install I get an error stating Failed at the bcrypt#0.8.5 install script 'node-gyp rebuild'. After extensive googling I still have not found the problem.
Here's the error log:
Error Log
313 verbose stack Error: bcrypt#0.8.5 install: `node-gyp rebuild`
313 verbose stack Exit status 1
313 verbose stack at EventEmitter.<anonymous> (C:\Users\Apparaat1\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:239:16)
313 verbose stack at emitTwo (events.js:100:13)
313 verbose stack at EventEmitter.emit (events.js:185:7)
313 verbose stack at ChildProcess.<anonymous> (C:\Users\Apparaat1\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
313 verbose stack at emitTwo (events.js:100:13)
313 verbose stack at ChildProcess.emit (events.js:185:7)
313 verbose stack at maybeClose (internal/child_process.js:827:16)
313 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
314 verbose pkgid bcrypt#0.8.5
315 verbose cwd D:\Werk\W12C\we12c\W12C
316 error Windows_NT 6.1.7601
317 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Apparaat1\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
318 error node v5.7.0
319 error npm v3.7.3
320 error code ELIFECYCLE
321 error bcrypt#0.8.5 install: `node-gyp rebuild`
321 error Exit status 1
322 error Failed at the bcrypt#0.8.5 install script 'node-gyp rebuild'.
322 error Make sure you have the latest version of node.js and npm installed.
322 error If you do, this is most likely a problem with the bcrypt package,
322 error not with npm itself.
322 error Tell the author that this fails on your system:
322 error node-gyp rebuild
322 error You can get information on how to open an issue for this project with:
322 error npm bugs bcrypt
322 error Or if that isn't available, you can get their info via:
322 error npm owner ls bcrypt
322 error There is likely additional logging output above.
323 verbose exit [ 1, true ]
Versions:
node -v
v5.7.0
npm -v
3.7.3
May be it's a little bit late but the solution in node-gyp
https://github.com/nodejs/node-gyp#installation
There are 2
different options.
Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).
Option 2: Install tools and configuration manually:
Visual C++ Build Environment:
Option 1: Install Visual C++ Build Tools using the Default Install option.
Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.
Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 (or see below for further instructions on specifying the proper Python version and path.)
Launch cmd, npm config set msvs_version 2015
If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips.
[Windows Vista / 7 only] requires .NET Framework 4.5.1

how to avoid error during bower installation?

I am trying to install bower in windows 7:
npm install bower -g
It returns with this error:
error Error: No compatible version found: bower-endpoint-parser#'^0.2.2'
1073 error Valid install targets:
1073 error ["0.1.0-rc.1","0.1.0","0.2.0","0.2.1","0.2.2"]
1073 error at installTargetsError (C:\Users\myname\node-0.10.4\node-0.10.4\node_modules\npm\lib\cache.js:685:10)
1073 error at C:\Users\myname\node-0.10.4\node-0.10.4\node_modules\npm\lib\cache.js:607:10
1073 error at saved (C:\Users\myname\node-0.10.4\node-0.10.4\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
1073 error at Object.oncomplete (fs.js:107:15)
1074 error If you need help, you may report this log at:
1074 error <http://github.com/isaacs/npm/issues>
1074 error or email it to:
1074 error <npm-#googlegroups.com>
1075 error System Windows_NT 6.1.7601
1076 error command "C:\\Users\\myname\\node-0.10.4\\node-0.10.4\\\\node.exe" "C:\\Users\\myname\\node-0.10.4\\node-0.10.4\\node_modules\\npm\\bin\\npm-cli.js" "install" "bower"
1077 error cwd C:\Users\myname\BowerJS
1078 error node -v v0.10.4
1079 error npm -v 1.2.18
You have a pretty old version of NPM (1.2). NPM notoriously has problems with Windows, e.g. because of long file paths which are not allowed on Windows.
First try cleaning the cache and retrying with npm -g cache clean and then update npm before other steps

Push to Heroku failed - error fsevents#0.2.0 install: `node-gyp rebuild`

I'm trying to push my app to Heroku but I keep getting this error, looks like an issue with node-gyp but no idea how to go about fixing it.
2854 verbose rebuildBundles fsevents#0.2.0
2855 verbose rebuildBundles [ 'nan' ]
2856 info install fsevents#0.2.0
2857 verbose unsafe-perm in lifecycle true
2858 info fsevents#0.2.0 Failed to exec install script
2859 error fsevents#0.2.0 install: `node-gyp rebuild`
2859 error Exit status 1
2860 error Failed at the fsevents#0.2.0 install script.
2860 error This is most likely a problem with the fsevents package,
2860 error not with npm itself.
2860 error Tell the author that this fails on your system:
2860 error node-gyp rebuild
2860 error You can get their info via:
2860 error npm owner ls fsevents
2860 error There is likely additional logging output above.
2861 error System Linux 3.8.11-ec2
2862 error command "/tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18/vendor/node/bin/node" "/tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18/vendor/node/bin/npm" "rebuild"
2863 error cwd /tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18
2864 error node -v v0.10.28
2865 error npm -v 1.4.9
2866 error code ELIFECYCLE
2867 verbose exit [ 1, true ]
! Push rejected, failed to compile Node.js app
fsevents is a Mac OS X only extension and fails to install on Heroku (Linux). Try making the dependency optional using optionalDependencies in package.json.

Resources