
Every time I tried to add up a module which used some sort of specific dependencies (
events.js:112░░░░░░⸩ ⠼ extract:decode-uri-component: info audit Submitting payl
throw er; // Unhandled 'error' event
^
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:237:12)
at PassThrough.Writable.write (_stream_writable.js:287:5)
at PassThrough.Writable.end (_stream_writable.js:572:10)
at ReadEntry.entry.on (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
at ReadEntry.emit (events.js:132:15)
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 Unzip.emit (events.js:127:13)
at Unzip.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:99:17)
at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minizlib/index.js:284:29)
events.js:112░░░░░░⸩ ⠼ extract:decode-uri-component: info audit Submitting payl
throw er; // Unhandled 'error' event
^
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:237:12)
at PassThrough.Writable.write (_stream_writable.js:287:5)
at PassThrough.Writable.end (_stream_writable.js:572:10)
at ReadEntry.entry.on (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
at ReadEntry.emit (events.js:132:15)
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 Unzip.emit (events.js:127:13)
at Unzip.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:99:17)
at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minizlib/index.js:284:29)
How to solve?
Trying running the following on terminal~
sudo npm cache clean --force
it will return you back a warning something like ~
npm WARN using --force I sure hope you know what you are doing.
sudo npm i -g npm@5.6.0
if it still did’nt work, try remove node and update your npm package @5.6.0
Cheers!!