Arch - 通过 npm 安装 truffle - npm 错误!结束后写

Arch - 通过 npm 安装 truffle - npm 错误!结束后写

我正在尝试安装松露,一个以太坊开发框架,通过 npm,运行sudo npm i -D -g truffle.不幸的是我收到以下错误:

npm ERR! code ERR_STREAM_WRITE_AFTER_END
npm ERR! write after end

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-03-04T06_53_40_814Z-debug.log

我对 npm 没有任何经验,所以任何帮助将不胜感激。

调试日志提取

1401 verbose stack Error [ERR_STREAM_WRITE_AFTER_END]: write after end
1401 verbose stack     at writeAfterEnd (_stream_writable.js:237:12)
1401 verbose stack     at PassThrough.Writable.write (_stream_writable.js:287:5)
1401 verbose stack     at PassThrough.Writable.end (_stream_writable.js:572:10)
1401 verbose stack     at ReadEntry.entry.on (/usr/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
1401 verbose stack     at ReadEntry.emit (events.js:132:15)
1401 verbose stack     at ReadEntry.emit (/usr/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:287:25)
1401 verbose stack     at ReadEntry.[maybeEmitEnd] (/usr/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:240:12)
1401 verbose stack     at ReadEntry.end (/usr/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:153:27)
1401 verbose stack     at Unpack.[consumeBody] (/usr/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)
1401 verbose stack     at Unpack.[consumeChunkSub] (/usr/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
1401 verbose stack     at Unpack.[consumeChunk] (/usr/lib/node_modules/npm/node_modules/tar/lib/parse.js:360:30)
1401 verbose stack     at Unzip.(anonymous function).on.chunk (/usr/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
1401 verbose stack     at Unzip.emit (events.js:127:13)
1401 verbose stack     at Unzip.emit (/usr/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:287:25)
1401 verbose stack     at Unzip.write (/usr/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:90:17)
1401 verbose stack     at Unzip.write (/usr/lib/node_modules/npm/node_modules/tar/node_modules/minizlib/index.js:284:29)
1402 verbose cwd /home/someonw/somewhere
1403 verbose Linux 4.15.6-1-ARCH
1404 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "-D" "-g" "truffle"
1405 verbose node v9.7.1
1406 verbose npm  v5.7.1
1407 error code ERR_STREAM_WRITE_AFTER_END
1408 error write after end
1409 verbose exit [ 1, true ]

一些一般信息

$ uname -a
Linux someone 4.15.6-1-ARCH #1 SMP PREEMPT Sun Feb 25 12:53:23 UTC 2018 x86_64 GNU/Linux

$ npm --version
5.7.1            

答案1

根据@Matt 的关联,这显然是一个错误。我今天在 arch 存储库中看到了一个更新,之后 truffle 安装得很好。

相关内容