Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot make npm install -g work for my package
    primarykey
    data
    text
    <p>I am trying to add CLI functionality to my npm package intercept-proxy. I couldn't find any good documentation so I basically copied and modified stuff from express.js.</p> <p>I added:</p> <pre><code>"bin": { "intercept-proxy": "./bin/intercept-proxy" } </code></pre> <p>...to my package.json file and created a /bin/intercept-proxy.js which contains the CLI stuff.</p> <p>When I run:</p> <pre><code>npm install -g intercept-proxy </code></pre> <p>... everything works until the linking part. Then it fails, saying:</p> <pre><code>npm ERR! Error: ENOENT, chmod 'C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy\bin\intercept-proxy </code></pre> <p>... and the log says:</p> <pre><code>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 &lt;http://github.com/isaacs/npm/issues&gt; 395 error or email it to: 395 error &lt;npm-@googlegroups.com&gt; 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 ] </code></pre> <p>I tried googling ENOENT, chown + Windows but don't seem to get any further.</p> <p>The full code is up at <a href="https://github.com/JohanObrink/intercept-proxy">https://github.com/JohanObrink/intercept-proxy</a></p> <p>Edit: I have now tried it on OS X and the problem is the same. Not windows related - just me-being-a-n00b related apparently. Still cannot find what's wrong though.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload