Giter Site home page Giter Site logo

Comments (14)

IOAyman avatar IOAyman commented on June 19, 2024

Make sure you have the C++ compiler installed on your system.

sudo apt install build-essential

from iamdinosaur.

sammaina avatar sammaina commented on June 19, 2024

Also having issues with the installation on Windows (10). Installed G++ and still didn't work
image

npm: '3.10.8'

from iamdinosaur.

IOAyman avatar IOAyman commented on June 19, 2024

@sammaina In your case it's looking for the python executable (Line 2 of the error stack). Please add it to your %PATH% variable.

Linux-based OSes wont have issues concerning python because most of those OSes have it installed out of the box

from iamdinosaur.

yangzgnay avatar yangzgnay commented on June 19, 2024

@IOAyman I have gcc installed. The same error is still here. I screen shot the whole message for your reference.
image

What possibly can it be? Thanks in advance.

from iamdinosaur.

yangzgnay avatar yangzgnay commented on June 19, 2024

@sammaina You can follow the A.3 step of the following link to install python or add python to your PATH. Windows do not have python pre-installed. If you want to install python, please install python 2.7., since npm do not support 3.
http://datastructur.es/sp16/materials/lab/lab1b/lab1b.html#a-windows-setup

from iamdinosaur.

Adryd avatar Adryd commented on June 19, 2024

Similar happens with macOS, It searches for XCode or CLT but fails and crashes.

from iamdinosaur.

jotaporras avatar jotaporras commented on June 19, 2024

I'm having the same issue in Ubuntu 16.04. I verified that I have C++ compiler and Python 2.7.1 installed and in path. Had Node 4, tried updating to 6.9.1, still didn't work. NPM 3.10.9.

This is my stack running npm install (directory = [...]):


> [email protected] install [...]/IAMDinosaur/node_modules/robotjs
> node-gyp rebuild

make: Entering directory '[...]/IAMDinosaur/node_modules/robotjs/build'
  CXX(target) Release/obj.target/robotjs/src/robotjs.o
cc1plus: warning: command line option ‘-Wbad-function-cast’ is valid for C/ObjC but not for C++
In file included from ../src/keypress.h:6:0,
                 from ../src/robotjs.cc:7:
../src/keycode.h:76:23: fatal error: X11/Xutil.h: No such file or directory
compilation terminated.
robotjs.target.mk:113: recipe for target 'Release/obj.target/robotjs/src/robotjs.o' failed
make: *** [Release/obj.target/robotjs/src/robotjs.o] Error 1
make: Leaving directory '[...]/IAMDinosaur/node_modules/robotjs/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-24-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd [...]/IAMDinosaur/node_modules/robotjs
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! Linux 4.4.0-24-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs robotjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls robotjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     [...]/IAMDinosaur/npm-debug.log

from iamdinosaur.

sammaina avatar sammaina commented on June 19, 2024

@IOAyman @yangzgnay Thanks it helped. Landed into the same error.
Error: gyp failed with exit code: 1
image

from iamdinosaur.

jotaporras avatar jotaporras commented on June 19, 2024

Guys, it seems it's a bug with the robotjs dependency. I updated line 23 of package.json to
"robotjs": "^0.4.5",

and now npm install works.

from iamdinosaur.

yangzgnay avatar yangzgnay commented on June 19, 2024

@jotaporras
Still not work on my side after changing ^0.3.7 to ^0.4.5. The same error appears.

from iamdinosaur.

jotaporras avatar jotaporras commented on June 19, 2024

@yangzgnay Maybe take a look at octalmage/robotjs#17 ?
The people there speak about a couple of other dependencies that might be needed. Also consider switching to node 6

from iamdinosaur.

mercuryw avatar mercuryw commented on June 19, 2024

I have problem when npm install. I think it has something to do with Robotjs package.
I have Visual Studio, python2.7.
qq 20161103154854

Can someone help me? Thanks.

from iamdinosaur.

EduardoHillebrand avatar EduardoHillebrand commented on June 19, 2024

Idk but i guess it only works on mac OS.

from iamdinosaur.

HusainZafar avatar HusainZafar commented on June 19, 2024

@jotaporras Works for me. Thanks

from iamdinosaur.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.