我正在尝试从以下存储库访问模板:https://github.com/zurb/foundation-sites-template 我成功克隆了存储库,但是显然,为了获得实际的sass,我需要安装npm依赖项。所以我运行npm install,只是得到这个错误:
events.js:160░░░░░░⸩ ⠼ extract:interpret: sill extract interpret@1.0.4
throw er; // Unhandled 'error' event
^
Error: write after end
at writeAfterEnd (_stream_writable.js:193:12)
at PassThrough.Writable.write (_stream_writable.js:240:5)
at PassThrough.Writable.end (_stream_writable.js:477:10)
at ReadEntry.entry.on (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
at emitOne (events.js:101:20)
at ReadEntry.emit (events.js:188:7)
at ReadEntry.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at ReadEntry.[maybeEmitEnd] (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:249:12)
at ReadEntry.end (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:162:27)
at Unpack.[consumeBody] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)
at Unpack.[consumeChunkSub] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
at Unpack.[consumeChunk] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)
at Unzip.(anonymous function).on.chunk (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
at emitOne (events.js:96:13)
at Unzip.emit (events.js:188:7)
at Unzip.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
我正在使用npm版本6.0.0和节点v6.11.2。在Mac上运行。
此后,我尝试使用npm install foundation-cli --global
安装基础cli,但得到了完全相同的错误。据我所知,我满足github repository上列出的所有要求,不确定是什么问题。
答案 0 :(得分:0)
好吧,原来是我的npm或节点版本。我将两个版本都更新为最新版本(npm 6.4.1,节点v10.8.0),并且npm install
运行良好。我想这里可以学到的是,在处理zurb Foundation时,只需尝试使用最新的软件即可。