nowjs/node-proxy fails to install on ubuntu 11.10 - node.js

I'm trying to install now.js on ubuntu 11.10 (running on windows with wubi, if that matters). I've downloaded and installed node, npm, and socket.io just fine, but sudo npm install now fails for some reason. I've tried with and without sudo, tried installing it globally, same error. Make is installed just fine...is it some problem with the node-proxy package? For what it's worth, trying npm install node-proxy produces a similar error.
node version 0.6.2
npm version 1.0.106
ubuntu 11.10 (windows with wubi)
The log reads, when I try to install now:
npm WARN node-proxy#0.5.2 package.json: bugs['web'] should probably be bugs['url']
> node-proxy#0.5.2 install /home/my_name/node_modules/now/node_modules/node-proxy
> make
BUILDING: C++ Component
/bin/sh: node-waf: not found
cp: cannot stat `src/build/*/node-proxy.node': No such file or directory
make: *** [all] Error 1
npm ERR! error installing node-proxy#0.5.2 Error: node-proxy#0.5.2 install: `make`
npm ERR! error installing node-proxy#0.5.2 `sh "-c" "make"` failed with 2
npm ERR! error installing node-proxy#0.5.2 at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing node-proxy#0.5.2 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing node-proxy#0.5.2 at maybeExit (child_process.js:359:16)
npm ERR! error installing node-proxy#0.5.2 at Process.onexit (child_process.js:395:5)
npm ERR! error installing now#0.7.6 Error: node-proxy#0.5.2 install: `make`
npm ERR! error installing now#0.7.6 `sh "-c" "make"` failed with 2
npm ERR! error installing now#0.7.6 at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing now#0.7.6 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing now#0.7.6 at maybeExit (child_process.js:359:16)
npm ERR! error installing now#0.7.6 at Process.onexit (child_process.js:395:5)
npm ERR! node-proxy#0.5.2 install: `make`
npm ERR! `sh "-c" "make"` failed with 2
npm ERR!
npm ERR! Failed at the node-proxy#0.5.2 install script.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make
npm ERR! You can get their info via:
npm ERR! npm owner ls node-proxy
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.0.0-13-generic
npm ERR! command "node" "/usr/bin/npm" "install" "now"
npm ERR! cwd /home/my_name
npm ERR! node -v v0.6.2
npm ERR! npm -v 1.0.106
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/my_name/npm-debug.log
npm not ok

The issue appears to be that node-waf is missing.
node-waf is a tool that is included with node which allows compiling binary modules, such as node-proxy.
You can test to see if node-waf is available simply by typing node-waf into the terminal to see if the command can be found. If not, you will need to reinstall node (run make install again) to make sure node-waf is available.

Related

I want to install mechanic on npm, I tried to run this line sudo npm install -g mechanic, but it gives me error, I don't understand this error

I want to install mechanic on my nginx server.
I got this error when I execute sudo npm install -g mechanic:
tigaron#galaxybrainpower:/var/www/tigaron$ sudo npm install -g mechanic
/usr/bin/mechanic -> /usr/lib/node_modules/mechanic/bin/mechanic
> fs-ext#2.0.0 install /usr/lib/node_modules/mechanic/node_modules/fs-ext
> node-gyp configure build
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/tigaron/.cache/node-gyp/10.20.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/mechanic/node_modules/fs-ext/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/mechanic/node_modules/fs-ext/.node-gyp'
gyp ERR! System Linux 4.15.0
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/lib/node_modules/mechanic/node_modules/fs-ext
gyp ERR! node -v v10.20.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fs-ext#2.0.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fs-ext#2.0.0 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! /home/tigaron/.npm/_logs/2020-05-24T06_29_26_857Z-debug.log
What is happening here? How to fix this error and proceed with the installation?
This answer solved the same issue I had when installing a different package.
Apparently the nobody user is used when building packages globally, but the directories are owned by root so it fails permissions. Configuring npm to use root with the following command is what the answer recommends.
npm -g config set user root

NPM / Nodejs: Can't install scrypt#6.0.3

Actually I am trying to install express-basic-auth, but it fails due to the installation of scrypt#6.0.3. I already tried:
sudo apt-get install build-essential
and also tried deleting ~/.node-gyp as stated here: https://github.com/nodejs/node-gyp/issues/809, but none of the suggestions helped. I still get the same error:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/user/code/a/b/node_modules/scrypt/build'
gyp ERR! System Linux 4.20.0-042000-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/code/a/b/node_modules/scrypt
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN b#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 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! /home/user/.npm/_logs/2018-12-30T20_52_24_060Z-debug.log
Can anybody help?
I solved this problem by installing an earlier version of node locally, in my case the node 8.10.0 version. I stopped getting the same error you are getting here. Delete your node modules and package-lock.json then run
npm install --save node#earlierversion
npm install rest of packages
That's what I did to rebuild my node modules and prevent this error.

tar.unpack error installing a script package on Atom

I am trying to install script package on Atom but it gives the following error:
npm ERR! tar.unpack error reading /tmp/d-116420-6290-1xjcgjb/package.tgz
npm ERR! addLocal Could not install /tmp/d-116420-6290-1xjcgjb/package.tgz
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/nobodyu/.atom/.apm/.apmrc" "--userconfig" "/home/nobodyu/.atom/.apmrc" "install" "/tmp/d-116420-6290-1xjcgjb/package.tgz" "--target=0.36.8" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! 0-byte tarball
npm ERR! Please run `npm cache clean`
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/apm-install-dir-116420-6290-1gbk138/npm-debug.log
I've also run
npm cache clean
And
sudo npm install -g npm#latest
But it is still giving me the same error
How can I successfully install this package?
https://github.com/atom/atom/issues/11798 check here if you are searching for Solution.

How can I install bignum lib for Node.js on Heroku?

I get the following error
-----> Installing dependencies with npm
> bignum#0.5.1 install /tmp/build_1xz3suiyqvjwh/node_modules/bignum
> node-gyp configure build
sh: node-gyp: not found
npm ERR! error installing bignum#0.5.1 Error: bignum#0.5.1 install: `node-gyp configure build`
npm ERR! error installing bignum#0.5.1 `sh "-c" "node-gyp configure build"` failed with 127
npm ERR! error installing bignum#0.5.1 at ChildProcess.<anonymous> (/tmp/node-npm-Pi2L/lib/utils/exec.js:49:20)
npm ERR! error installing bignum#0.5.1 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing bignum#0.5.1 at maybeExit (child_process.js:358:16)
npm ERR! error installing bignum#0.5.1 at Process.onexit (child_process.js:394:5)
npm ERR! bignum#0.5.1 install: `node-gyp configure build`
npm ERR! `sh "-c" "node-gyp configure build"` failed with 127
npm ERR!
npm ERR! Failed at the bignum#0.5.1 install script.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls bignum
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.32-343-ec2
npm ERR! command "/tmp/node-node-8eWj/bin/node" "/tmp/node-npm-Pi2L/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_1xz3suiyqvjwh
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.0.106
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_1xz3suiyqvjwh/npm-debug.log
npm not ok
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app

NPM and jsdom Error Loading

Getting into the world of node.js. Basically just starting out. I have installed node and got some things working. From my understanding I need to install the module jsdom to get jQuery working. So I downloaded and compiled NPM and when I ran the npm install jsdom command I got back a ton of errors. Here is the printout:
npm WARN htmlparser#1.7.3 package.json: bugs['web'] should probably be bugs['url']
> contextify#0.0.7 preinstall /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify
> node-waf clean || true; node-waf configure build
Nothing to clean (project not configured)
Setting srcdir to : /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify
Setting blddir to : /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify/build
Checking for program g++ or c++ : not found
Checking for program icpc : not found
Checking for program c++ : not found
/usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify/wscript:11: error: could not configure a cxx compiler!
npm ERR! error installing contextify#0.0.7 Error: contextify#0.0.7 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing contextify#0.0.7 `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing contextify#0.0.7 at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm ERR! error installing contextify#0.0.7 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing contextify#0.0.7 at maybeExit (child_process.js:359:16)
npm ERR! error installing contextify#0.0.7 at Process.onexit (child_process.js:395:5)
npm ERR! error installing jsdom#0.2.10 Error: contextify#0.0.7 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing jsdom#0.2.10 `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing jsdom#0.2.10 at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm ERR! error installing jsdom#0.2.10 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing jsdom#0.2.10 at maybeExit (child_process.js:359:16)
npm ERR! error installing jsdom#0.2.10 at Process.onexit (child_process.js:395:5)
npm ERR! contextify#0.0.7 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the contextify#0.0.7 preinstall script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.35-27-virtual
npm ERR! command "node" "/usr/bin/npm" "install" "jsdom"
npm ERR! cwd /usr/lib/nodejs/npm/node_modules
npm ERR! node -v v0.6.2
npm ERR! npm -v 1.0.105
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/lib/nodejs/npm/node_modules/npm-debug.log
npm not ok
It obviously did not work.
Do I need this package to execute jQuery?
What am I doing wrong here?
Thanks.
Checking for program g++ or c++ : not found
You haven't installed the basic stuff needed for compiling things. On Debian and Ubuntu, this should fix it:
sudo apt-get install build-essential
For other distributions, the command is somewhat different, but the basic principle is the same.

Resources