ivanseidel / IAMDinosaur

🦄 An Artificial Inteligence to teach Google's Dinosaur to jump cactus
MIT License
2.8k stars 533 forks source link

Unable to execute npm install #10

Closed shackdown closed 8 years ago

shackdown commented 8 years ago

Hi,

I am unable to execute the cmd npm install. I obtain the error below :

pc36:IAMDinosaur-master Cyril$ su cyril npm install
Password: *****
/usr/local/bin/npm: npm: line 2: syntax error near unexpected token `;'
/usr/local/bin/npm: npm: line 2: `;(function () { // wrapper in case we're in module_context mode'

For information I use node in v4.2.4 and npm in 2.14.12 in OS X El Capitan 10.11.2

Thanks for your assistance. Regards

ivanseidel commented 8 years ago

That's pretty weird!

Let's begin trying to fix with this: http://stackoverflow.com/a/18321155/1234504

run: bash npm install

shackdown commented 8 years ago

Hi Ivanseidel,

thanks for your help. I have tried it before post an issue. Below the error message that I have :

pc36:IAMDinosaur-master Cyril$ su cyril bash npm install
Password: ****
/bin/bash: /bin/bash: cannot execute binary file

regards,

ivanseidel commented 8 years ago

why is there su cyril before bash npm install? Are you running it with sudo?

Remeuh commented 8 years ago

Hello there, I cant run npm install either. I'm running Ubuntu 14 and I have the folowing 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:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.19.0-25-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/Desktop/Dino/node_modules/robotjs
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN EPACKAGEJSON iamdinosaur@1.0.0 No repository field.
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v5.3.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! robotjs@0.3.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the robotjs@0.3.7 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 their info via:
npm ERR!     npm owner ls robotjs

Thanks for your assistance. Best regards.

ivanseidel commented 8 years ago

Hi, Follow instructions on RobotJS and see if it resolves: https://github.com/octalmage/robotjs#installation

prabod commented 7 years ago

try installing libxtst-dev package sudo apt-get install libxtst-dev on ubuntu

bglima commented 6 years ago

The problem is that previous versions of nodejs were executed by calling node instead of nodejs. I was able to solve it by creating a symbolic link, as follows: ln -s /usr/bin/nodejs /usr/bin/node.

KishanMaurya commented 3 years ago

Please anyone can help me

/usr/bin/npm: line 2: ;(function () { // wrapper in case we're in module_context mode' 0|pizza | /usr/bin/npm: line 2: syntax error near unexpected token;'