2015-04-01 9 views
8

Installazione Grunt come nel Bootstrap documentation mostrato, ho installato grunt-cli a livello globale con npm install -g grunt-cli e ora sto cercando di eseguire npm install, ma ottenendo soltanto gli errori:npm install causa errori come npm ERR! tar.unpack errore untar su Debian

[email protected]:/var/www/axit/portfolio/public/bower_components/bootstrap# npm install 
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz 
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz 
npm ERR! tar.unpack untar error /root/.npm/brace-expansion/1.1.0/package.tgz 
npm ERR! tar.unpack untar error /root/.npm/delayed-stream/0.0.5/package.tgz 
npm WARN optional dep failed, continuing [email protected] 
npm ERR! tar.unpack untar error /root/.npm/is-property/1.0.2/package.tgz 
npm WARN optional dep failed, continuing [email protected] 
npm ERR! Linux 3.2.0-4-amd64 
npm ERR! argv "node" "/usr/local/bin/npm" "install" 
npm ERR! node v0.10.35 
npm ERR! npm v2.7.4 
npm ERR! path /var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-saucelabs/node_modules/sauce-tunnel/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js 
npm ERR! code EPERM 
npm ERR! errno 50 

npm ERR! Error: EPERM, open '/var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-saucelabs/node_modules/sauce-tunnel/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js' 
npm ERR! { [Error: EPERM, open '/var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-saucelabs/node_modules/sauce-tunnel/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js'] 
npm ERR! errno: 50, 
npm ERR! code: 'EPERM', 
npm ERR! path: '/var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-saucelabs/node_modules/sauce-tunnel/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js' } 
npm ERR! 
npm ERR! Please try running this command again as root/Administrator. 
npm ERR! Linux 3.2.0-4-amd64 
npm ERR! argv "node" "/usr/local/bin/npm" "install" 
npm ERR! node v0.10.35 
npm ERR! npm v2.7.4 
npm ERR! path npm-debug.log.ba707f2a7a688e388708bbe88e2dd4ed 
npm ERR! code ETXTBSY 
npm ERR! errno 62 

npm ERR! ETXTBSY, rename 'npm-debug.log.ba707f2a7a688e388708bbe88e2dd4ed' 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 

npm ERR! Please include the following file with any support request: 
npm ERR!  /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log 

ho appena copiato il progetto in una cartella non condivisa e avviato di nuovo npm install. E ha funzionato. Quindi, sembra essere un problema di cartella condivisa. Ma cosa esattamente? Symlinks are enabled per questa cartella condivisa e ho avviato la VM come admin (mi ha aiutato, quando ho avuto problemi simili installando Bower).

Che cosa sta causando questi errori e come risolvere questo problema?

Ambiente: VirtualBox con sistema guest Debian e sistema host Windows 7.

EDIT

Ora (Penso che dopo che ho eseguito con successo npm install in una cartella non condivisa) Sono geting diversi errori:

Quando inizio la VM nel comune modo:

[email protected]:/var/www/axit/portfolio/public/bower_components/bootstrap# npm install 
npm ERR! tar.unpack untar error /root/.npm/delayed-stream/0.0.5/package.tgz 
npm WARN optional dep failed, continuing [email protected] 
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz 
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz 
npm ERR! tar.unpack untar error /root/.npm/brace-expansion/1.1.0/package.tgz 
npm ERR! Linux 3.2.0-4-amd64 
npm ERR! argv "node" "/usr/local/bin/npm" "install" 
npm ERR! node v0.10.35 
npm ERR! npm v2.7.4 
npm ERR! path ../semver/bin/semver 
npm ERR! code UNKNOWN 
npm ERR! errno -1 

npm ERR! UNKNOWN, symlink '../semver/bin/semver' 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 
npm ERR! Linux 3.2.0-4-amd64 
npm ERR! argv "node" "/usr/local/bin/npm" "install" 
npm ERR! node v0.10.35 
npm ERR! npm v2.7.4 
npm ERR! path npm-debug.log.428531818e2d916d5ae79bdf94dd73b3 
npm ERR! code ETXTBSY 
npm ERR! errno 62 

npm ERR! ETXTBSY, rename 'npm-debug.log.428531818e2d916d5ae79bdf94dd73b3' 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 

npm ERR! Please include the following file with any support request: 
npm ERR!  /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log 

Quando avvio il VM come Administrator:

01.235.
[email protected]:/var/www/axit/portfolio/public/bower_components/bootstrap# npm install 
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz 
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz 
npm ERR! tar.unpack untar error /root/.npm/delayed-stream/0.0.5/package.tgz 
npm ERR! tar.unpack untar error /root/.npm/brace-expansion/1.1.0/package.tgz 
npm WARN optional dep failed, continuing [email protected] 
npm ERR! Linux 3.2.0-4-amd64 
npm ERR! argv "node" "/usr/local/bin/npm" "install" 
npm ERR! node v0.10.35 
npm ERR! npm v2.7.4 
npm ERR! path /var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy 
npm ERR! code UNKNOWN 
npm ERR! errno -1 

npm ERR! UNKNOWN, mkdir '/var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy' 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 
npm ERR! Linux 3.2.0-4-amd64 
npm ERR! argv "node" "/usr/local/bin/npm" "install" 
npm ERR! node v0.10.35 
npm ERR! npm v2.7.4 
npm ERR! path npm-debug.log.0bb66467f3aae813a34e03a797f8da19 
npm ERR! code ETXTBSY 
npm ERR! errno 62 

npm ERR! ETXTBSY, rename 'npm-debug.log.0bb66467f3aae813a34e03a797f8da19' 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 

npm ERR! Please include the following file with any support request: 
npm ERR!  /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log 
+1

Non ho ancora provato a replicare il problema, ma prima vorrei farti una domanda: hai provato a eseguire il comando usando 'sudo'? Perché questa riga 'npm ERR! Si prega di provare a eseguire questo comando nuovamente come root/Administrator. Sembra suggerire che. Qualcosa come "sudo npm install" potrebbe essere la soluzione. –

+0

Sono 'root' sul sistema guest Debian. E ho anche avviato la VM come 'Administrator' sull'host. – automatix

+0

Non sono sicuro, ma in [questa risposta] (http://stackoverflow.com/a/23526288/4594377) e i commenti seguenti, suggeriscono di utilizzare un'opzione aggiuntiva '--no-bin-link'. Hai detto che hai avuto problemi durante l'installazione di Bower, forse solo abilitare i collegamenti simbolici non era abbastanza. –

risposta

3

Provare a fare sudo npm cache clean. Ma sembra che il problema è il percorso è troppo lungo per Windows (limite 260byte), quindi non è possibile condividere la directory.

Ho provato a utilizzare fenestrate ma non ha funzionato per me. Potresti anche voler controllare this entry.

+0

Grazie per la risposta. Dopo molti tentativi ha finalmente funzionato. In qualche modo ... Non ricordo più, penso, ho usato una soluzione alternativa, ma non ricordo, cosa fosse esattamente. Ad ogni modo, se avrò di nuovo questo problema, proverò la tua soluzione e darò un feedback. – automatix

9

Ok vedo la soluzione

sudo npm cache clean 

Poi

sudo npm install -g grunt grunt-cli 

Ho fatto questo su MacOS

3

Assicurarsi che il disco rigido non è pieno. Era il mio caso.

0

Sto affrontando lo stesso problema e ho provato tutte le opzioni suggerite qui senza successo. Infine, ho letto da qualche parte che, dovrei avere i permessi di superutente, così ho fatto

sudo -s 

e sembra aver risolto il problema.

1

ho avuto un errore simile e di seguito non hanno risolto il problema immediatamente:

npm cache clean 
rm -rf node_modules 
npm install 

Si scopre che avevo esaurito lo spazio su disco sulla mia macchina virtuale. Dopo aver assegnato più spazio e eseguito i comandi sopra, tutto ha funzionato come previsto.

+0

Grazie per il suggerimento sullo spazio. Lo stesso problema qui. –

0

Per me npm cache clean non ha funzionato. Tuttavia rimuovere la directory problematica (npm rimuovere) e quindi semplicemente reinstallare il pacchetto!