gr2m/CORS-Proxy

Adding building information

Closed this issue · 7 comments

Probably the README.md can contain informations how to build CORS-Proxy.

gr2m commented

there is no build task that needs to be run. Once installed with npm install -g corsproxy you can start it using the corsproxy command

Ok, I have now installed corsproxy with "sudo npm install -g corsproxy" (as without sudo there were permission issues). But /usr/local/lib/node_modules/corsproxy/bin/index.js had then limited execution permissions (which is plausible as sudo maps to the permission of my user (which are limited to "user only") but the installation routine has set the ownership to nobody. Probably the installation routine should set the execution permission to all to prevent this issue). But executing corsproxy results now in another issue:

sworddragon@ubuntu:~$ sudo corsproxy
/usr/bin/env: node: No such file or directory

gr2m commented

Sounds like your node installation might be messed up. You should not need to install with sudo at all. I'm not a node / linux expert myself, can't really help to get it sorted out.

I just tried it myself and installation went without problems, on latest Mac OS X

You should not need to install with sudo at all.

After removing all and trying it again without sudo I'm getting this error:

sworddragon@ubuntu:~$ npm install -g corsproxy
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/corsproxy',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/nodejs/fstream/lib/writer.js:171:23',
npm ERR! '/usr/lib/nodejs/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.16.0-20-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "corsproxy"
npm ERR! cwd /home/sworddragon
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules
npm ERR! fstream_path /usr/local/lib/node_modules/corsproxy
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules'
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/sworddragon/npm-debug.log
npm ERR! not ok code 0

This seems not to be unexpected as normal users are normally not allowed to create anything in /usr/local/lib.

gr2m commented

Did you re-install Node.js itself? http://nodejs.org/

Try to google for "Error: EACCES, mkdir '/usr/local/lib/node_modules". This error definitely has nothing to do with corsproxy

I have reinstalled npm and nodejs (both from the Ubuntu package archive). If this is not an issue of corsproxy I'm forwarding this to Launchpad.

gr2m commented

yeah might be a problem with the way you installed it on Ubuntu. I'm sorry I can't help better