I am trying to add CLI functionality to my npm hook-proxy. I could not find good documentation, so I basically copied and modified material from express.js.
I added:
"bin": { "intercept-proxy": "./bin/intercept-proxy" }
... into my package.json file and created / bin / intercept -proxy.js which contains the CLI stuff.
When I run:
npm install -g intercept-proxy
... everything works up to the link. Then he fails, saying:
npm ERR! Error: ENOENT, chmod 'C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy\bin\intercept-proxy
... and the magazine says:
381 info linkStuff intercept-proxy@0.2.4 382 verbose linkBins intercept-proxy@0.2.4 383 verbose link bins [ { 'intercept-proxy': './bin/intercept-proxy' }, 383 verbose link bins 'C:\\Users\\johan.obrink.24HRCOM\\AppData\\Roaming\\npm', 383 verbose link bins true ] 384 verbose linkMans intercept-proxy@0.2.4 385 verbose rebuildBundles intercept-proxy@0.2.4 386 verbose rebuildBundles [ 'commander', 'mkdirp', 'underscore' ] 387 info C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy unbuild 388 verbose from cache C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy\package.json 389 info preuninstall intercept-proxy@0.2.4 390 info uninstall intercept-proxy@0.2.4 391 verbose true,C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules,C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules unbuild intercept-proxy@0.2.4 392 verbose C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm,[object Object] binRoot 393 info postuninstall intercept-proxy@0.2.4 394 error Error: ENOENT, chmod 'C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy\bin\intercept-proxy' 395 error If you need help, you may report this log at: 395 error <http://github.com/isaacs/npm/issues> 395 error or email it to: 395 error <npm-@googlegroups.com> 396 error System Windows_NT 6.1.7601 397 error command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "intercept-proxy" 398 error cwd c:\src 399 error node -v v0.8.9 400 error npm -v 1.1.61 401 error path C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy\bin\intercept-proxy 402 error code ENOENT 403 error errno 34 404 verbose exit [ 34, true ]
I tried googling ENOENT, chown + Windows, but didn't seem to get any bigger.
The full code is at https://github.com/JohanObrink/intercept-proxy
Edit: Now I tried this on OS X, and the problem is the same. Not related to windows - apparently, only I-being-a-n00b. Still can't find what is wrong, but.
Johan Öbrink Oct 18 '12 at 16:22 2012-10-18 16:22
source share