Frage

Ich versuche Node.js alle auf dem Windows Server 2003 X64 mit Cygwin zu erreichen, drücken aber weiter auf Wände.

Es möchte, dass ich NPM als sudo ausführe, aber das ist keine Option bei Cygwin (Befehl nicht gefunden ..) ??

$ npm install socket.io --loglevel verbose
npm info it worked if it ends with ok
npm verb cli [ 'node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'install',
npm verb cli   'socket.io',
npm verb cli   '--loglevel',
npm verb cli   'verbose' ]
npm info using npm@1.0.1rc9
npm info using node@v0.5.0-pre
npm verb config file /home/rfitzger/.npmrc
npm verb config file /usr/local/etc/npmrc
npm verb caching /cygdrive/d/workspace/gits/hummingbird/package.json
npm verb loadDefaults hummingbird@0.0.1
npm verb from cache /cygdrive/d/workspace/gits/hummingbird/package.json
npm verb into /cygdrive/d/workspace/gits/hummingbird [ 'socket.io' ]
npm verb cache add [ 'socket.io@0.6.16', null ]
npm info addNamed [ 'socket.io', '0.6.16' ]
npm verb addNamed [ '0.6.16', '0.6.16' ]
npm verb GET socket.io/0.6.16
npm verb raw, before any munging socket.io/0.6.16
npm verb url resolving [ 'http://registry.npmjs.org/',
npm verb url resolving   './socket.io/0.6.16' ]
npm verb url resolved http://registry.npmjs.org/socket.io/0.6.16
npm verb url parsed { href: 'http://registry.npmjs.org/socket.io/0.6.16',
npm verb url parsed   protocol: 'http:',
npm verb url parsed   slashes: true,
npm verb url parsed   host: 'registry.npmjs.org',
npm verb url parsed   hostname: 'registry.npmjs.org',
npm verb url parsed   pathname: '/socket.io/0.6.16' }
npm ERR! Error: EPERM, Operation not permitted
npm ERR!     at Socket._onConnect (net.js:600:18)
npm ERR!     at IOWatcher.onWritable [as callback] (net.js:186:12)
npm ERR!
npm ERR! Please use 'sudo' or log in as root to run this command.
npm ERR!
npm ERR!     sudo npm "install" "socket.io" "--loglevel" "verbose"
npm ERR!
npm ERR! or set the 'unsafe-perm' config var to true.
npm ERR!
npm ERR!     npm config set unsafe-perm true
npm ERR!
npm ERR! System CYGWIN_NT-5.2-WOW64 1.7.9(0.237/5/3)
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io" "--loglevel"
"verbose"
npm verb exit [ 1, true ]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /cygdrive/d/workspace/gits/hummingbird/npm-debug.log
npm not ok
War es hilfreich?

Lösung

Vielleicht wurde Ihre Installation von Node.js als Root durchgeführt? Installieren Sie Node.js lokal unter Cygwin und installieren Sie NPM lokal und installieren Sie die Pakete

http://increaseyourgeek.wordpress.com/2010/08/18/install-node-js-without-using-sudo/

Hier ist das allgemeine Skript, das ich verwende:

#!/bin/bash -x

git clone git://github.com/joyent/node.git /tmp/node
export JOBS=2 # optional, sets number of parallel commands.
mkdir ~/local 
cd /tmp/node
./configure --prefix=$HOME/local/node
make
make install
export PATH=$HOME/local/node/bin:$PATH


# install NPM - Node Package Manager
curl http://npmjs.org/install.sh | sh

# install necessary node packages
npm install express  (etc..)

Bearbeiten: Ich habe dies auf NPM -Version 0.3.17 gemacht. Ich kann Ihnen nicht sagen, was auf NPM Version 1 passiert

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top