2012-02-20 18 views
6

Ho provato ad installare il modulo per sempre per node.js sul mio server Windows, ma ottenuto questo errore:non si installa per sempre su Windows?

C:\rts_lobby>npm install forever 
npm http GET https://registry.npmjs.org/forever 
npm http 200 https://registry.npmjs.org/forever 
npm http GET https://registry.npmjs.org/forever/-/forever-0.8.5.tgz 
npm http 200 https://registry.npmjs.org/forever/-/forever-0.8.5.tgz 
(...snip...) 
npm http GET https://registry.npmjs.org/parse-table 

> [email protected] install C:\rts_lobby\node_modules\forever\node_modules\microti 
me 
> node-waf configure build 

npm http GET https://registry.npmjs.org/mkdirp 
npm http GET https://registry.npmjs.org/lazy 
npm http GET https://registry.npmjs.org/eventemitter2 
'node-waf' is not recognized as an internal or external command, 
operable program or batch file. 
npm ERR! error installing [email protected] 
npm http GET https://registry.npmjs.org/prompt/0.1.12 
(...snip...) 
npm http GET https://registry.npmjs.org/mkdirp 

> [email protected] preinstall C:\rts_lobby\node_modules\forever\node_modules\node 
-fork 
> bash ./install 

npm http 200 https://registry.npmjs.org/parse-table 
npm http 304 https://registry.npmjs.org/mkdirp 

> [email protected] preinstall C:\rts_lobby\node_modules\forever\node_modules\daemon 
> bash ./install 

npm http 200 https://registry.npmjs.org/lazy 
npm http GET https://registry.npmjs.org/wordwrap 
'bash' is not recognized as an internal or external command, 
operable program or batch file. 
'bash' is not recognized as an internal or external command, 
operable program or batch file. 
npm ERR! error installing [email protected] 
npm ERR! error installing [email protected] 
npm ERR! error installing [email protected] 
npm http 200 https://registry.npmjs.org/eventemitter2 
npm http 200 https://registry.npmjs.org/lru-cache 
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.0.7.tgz 

npm ERR! EEXIST, file already exists 'C:\rts_lobby\node_modules\forever\node_mod 
ules\___nconf.npm\package\lib\nconf' 
npm ERR! File exists: C:\rts_lobby\node_modules\forever\node_modules\___nconf.np 
m\package\lib\nconf 
npm ERR! Move it away, and try again. 
npm ERR! 
npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "forever" 
npm ERR! cwd C:\rts_lobby 
npm ERR! node -v v0.6.8 
npm ERR! npm -v 1.1.0-2 
npm ERR! path C:\rts_lobby\node_modules\forever\node_modules\___nconf.npm\packag 
e\lib\nconf 
npm ERR! fstream_path C:\rts_lobby\node_modules\forever\node_modules\___nconf.np 
m\package\lib\nconf\common.js 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code EEXIST 
npm ERR! message EEXIST, file already exists 'C:\rts_lobby\node_modules\forever\ 
node_modules\___nconf.npm\package\lib\nconf' 
npm ERR! errno {} 
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modul 
es\fstream\lib\writer.js:161:23 
npm ERR! fstream_stack Object.oncomplete (C:\Program Files (x86)\nodejs\node_mod 
ules\npm\node_modules\mkdirp\index.js:25:53) 

npm ERR! Error: ENOENT, no such file or directory 'C:\rts_lobby\node_modules\for 
ever\node_modules\___broadway.npm\package\test\common\directories-test.js' 
npm ERR! You may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 
npm ERR! 
npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "forever" 
npm ERR! cwd C:\rts_lobby 
npm ERR! node -v v0.6.8 
npm ERR! npm -v 1.1.0-2 
npm ERR! path C:\rts_lobby\node_modules\forever\node_modules\___broadway.npm\pac 
kage\test\common\directories-test.js 
npm ERR! fstream_path C:\rts_lobby\node_modules\forever\node_modules\___broadway 
.npm\package\test\common\directories-test.js 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code ENOENT 
npm ERR! message ENOENT, no such file or directory 'C:\rts_lobby\node_modules\fo 
rever\node_modules\___broadway.npm\package\test\common\directories-test.js' 
npm ERR! errno {} 
npm ERR! fstream_stack Object.oncomplete (C:\Program Files (x86)\nodejs\node_mod 
ules\npm\node_modules\fstream\lib\writer.js:204:26) 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  C:\rts_lobby\npm-debug.log 
npm not ok 

non potrebbe pensare che stavo facendo qualcosa di sbagliato, ma chi lo sa? Qualcuno ha idea del perché questo potrebbe non funzionare? Immagino che abbia a che fare con node-waf, che non è sul mio sistema per qualche motivo. Questo non è incluso di default?

+0

Consulta anche: http://stackoverflow.com/questions/4018154/node-js-as-a-background-service/12959291#12959291 o http://stackoverflow.com/questions/ 10547974/how-to-install-node-js-as-windows-service – Page2PagePro

risposta

8

Ho avuto lo stesso problema installando per sempre 0.8.4+ su Windows. Sembra che node-waf non sia nemmeno disponibile per Windows. Installato per sempre 0.8.3 per risolvere il problema - basta eseguire:

npm install forever=0.8.3 
+0

lo hai fatto con npm? – LordZardeck

+6

ho anche affrontato il problema nell'installazione per sempre in Windows. La versione attuale è 0.8.5. Ma 0.8.3 ha funzionato. npm install [email protected] Grazie. – user644745

0

Suppongo che tu stia utilizzando Cygwin? Sembra che tu A) non abbia installato bash tramite pacchetti cygwin o non sia nel tuo PATH

Se non stai usando cygwin, potresti volerlo usare perché sembra che questo pacchetto abbia delle dipendenze di sistema per alcuni comandi di linux nei suoi script di installazione.

+0

Aspetta, pensavo che il team del nodo lo facesse dove non avevi più bisogno di cygwin – LordZardeck

+0

Ciò non significa che tutti i moduli sono compatibili, nodifica il lavoro binario e npm bene senza cygwin, ma alcuni moduli possono ancora avere dipendenze nei loro script di compilazione che richiedono strumenti Cygwin. Penso che questo potrebbe essere il tuo problema. –

+0

ok, lo installerò, quindi riproverò. – LordZardeck

1

Su Windows, il modo migliore per mantenere il nodo in esecuzione è quello di utilizzare iisnode - http://tomasz.janczuk.org/2011/08/hosting-nodejs-applications-in-iis-on.html e http://weblogs.asp.net/jgalloway/archive/2011/10/26/using-node-js-in-an-asp-net-mvc-application-with-iisnode.aspx

d'accordo che non è l'ideale in tutte le situazioni , ma questo è il migliore che abbiamo al momento.

+0

grazie per le informazioni interessanti, ma stavo cercando per sempre. Sto finendo per ospitare la mia app di nodo su linux. – LordZardeck