mixu / nwm

Tiling window manager for X11 written in Node.js
http://mixu.net/nwm/
MIT License
789 stars 72 forks source link

npm WARN cannot run in wd nwm@1.0.1 node-gyp rebuild #41

Closed torleif closed 9 years ago

torleif commented 10 years ago

Tried to install on Debian (6 stable)

I receive the error npm WARN cannot run in wd nwm@1.0.1 node-gyp rebuild

tried running as root, and forcing it to run via npm. Still no luck.

mixu commented 10 years ago

npm WARN cannot run in wd looks to be a permissions error of some kind ( https://github.com/npm/npm/issues/3497 http://stackoverflow.com/questions/18136746/npm-install-failed-with-cannot-run-in-wd), can you try cloning the repo directly via:

git clone https://github.com/mixu/nwm.git
cd nwm
npm install

--unsafe-perm may help, also it would be helpful if you could paste the portion of npm-debug.log where the failure occurs (there should be more detailed logs in that file)

torleif commented 10 years ago

I tried running as root, and the three steps on the SO question.

The output is here:

https://gist.github.com/torleif/13744231c0b517fc2ce5

mixu commented 10 years ago
725 error Tell the author that this fails on your system:
725 error     node-gyp rebuild

ok, so node-gyp fails for some reason, npm install --verbose 2>&1 | grep gyp should contain more info

torleif commented 10 years ago

https://gist.github.com/torleif/33beb532d23f7d949a6e

mixu commented 9 years ago

sorry, not enough info to figure out what's wrong, closing for now.

I'd need to see the actual make output: I mean when make exits with err = 2 it will also say why it fails but none of the logs here have that info. e.g. npm wraps node-gyp wraps the c/c++ build tools and I'd need the output from the c/c++ build to know more.

mauvm commented 9 years ago

I'm having the same issue. Running node-gyp rebuild in the nwm directory gave me a "Python not found" error, I got around by installing Python 2.7:

pacman -R python
pacman -S python2
ln -s /usr/bin/python2 /usr/bin/python

After that I got an error about a missing X11 extension (Xinerama). So I've installed it:

pacman -S libxinerama

After that running npm install magically worked.

I'm running Arch Linux 2014-01-07 in a Vagrant box on my Macbook Pro.

mixu commented 9 years ago

@mauvm thanks for commenting - that makes sense, I forgot to mention python as a dependency in the readme. WIll update the readme with this info, thanks again!

ineentho commented 9 years ago

I had the problem as well. The thing is I'm using iojs (I suspect it's the same thing with node .12). Most things are forwards compatible so I didn't really care of the requirements you listed (.6, .8 or .10), but seems like .10 is required.

In short: Using node .10 did the trick for me

AKRFranko commented 9 years ago

If it helps, I've had similar issues on one of my Arch Linux boxes because of confusion between multiple python versions and binaries. IIRC all these issues went away for me when I did these things:

  1. Updated my system package manager and system packages realted to python.
  2. Made certain that my python version is properly set up in the shell regardless of node.
  3. Told npm which python to use as mentionned here https://github.com/TooTallNate/node-gyp ie: npm config set python /path/to/executable/python2.7

FWIW, maybe do this and then also what @mauvm said https://github.com/mixu/nwm/issues/41#issuecomment-66833641

Wolfium commented 8 years ago

Using combination of both worked perfectly.

unsafe-perm with npm and --allow-root with bower in postinstall script.

Thanks for the info and tips.