Pregunta

I uploaded a bower component as a tar file, and even though I know it's a valid tar file, when running bower install, I get the following error:

bower my-component#*                 error invalid tar file
    Stack trace: Error: invalid tar file
        at Extract.Parse._startEntry (/usr/local/lib/node_modules/bower/node_modules/tar/lib/parse.js:144:13)
        at Extract.Parse._process (/usr/local/lib/node_modules/bower/node_modules/tar/lib/parse.js:125:12)
        at BlockStream.<anonymous> (/usr/local/lib/node_modules/bower/node_modules/tar/lib/parse.js:46:8)
        at BlockStream.EventEmitter.emit (events.js:95:17)
        at BlockStream._emitChunk (/usr/local/lib/node_modules/bower/node_modules/tar/node_modules/block-stream/block-stream.js:145:10)
        at BlockStream.resume (/usr/local/lib/node_modules/bower/node_modules/tar/node_modules/block-stream/block-stream.js:58:15)
        at Extract.Reader.resume (/usr/local/lib/node_modules/bower/node_modules/fstream/lib/reader.js:253:34)
        at Entry.<anonymous> (/usr/local/lib/node_modules/bower/node_modules/tar/lib/parse.js:256:8)
        at Entry.EventEmitter.emit (events.js:92:17)
        at Entry.resume (/usr/local/lib/node_modules/bower/node_modules/tar/lib/entry.js:92:8)

    Console trace: Trace
        at StandardRenderer.error (/usr/local/lib/node_modules/bower/lib/renderers/StandardRenderer.js:74:17)
        at Logger.<anonymous> (/usr/local/lib/node_modules/bower/bin/bower:114:22)
        at Logger.EventEmitter.emit (events.js:95:17)
        at Logger.emit (/usr/local/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
        at /usr/local/lib/node_modules/bower/lib/commands/install.js:35:16
        at _rejected (/usr/local/lib/node_modules/bower/node_modules/q/q.js:807:24)
        at /usr/local/lib/node_modules/bower/node_modules/q/q.js:833:30
        at Promise.when (/usr/local/lib/node_modules/bower/node_modules/q/q.js:1077:31)
        at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/node_modules/q/q.js:751:41)
        at /usr/local/lib/node_modules/bower/node_modules/q/q.js:573:44

    System info: Bower version: 
    1.3.0 Node version: 0.10.26
    OS: Linux 2.6.32-5-amd64 x64

I have checked other tar files that have been uploaded the same way, and they look pretty much the same as mine. Ideas?

¿Fue útil?

Solución

The issue was the version of the tar file. I created the tar file using a Maven plugin: maven-assembly-plugin, but didn't specify the version. However it worked after setting the version to 2.4.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top