title: NPM run watch err! Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
body: <p>I am forget what i do previously. When i run my code some error's appear. I search solution to solve problems and try always way.</p>
  
  <p>I cleared my cache but still error. I remove node_modules and install again but still error. I try like a post in some website but still error.</p>
  
  <pre><code>i use :
  node v 10.15.3
  npm v 6.4.1
  
  error's code :
  Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
      at doWrite (_stream_writable.js:406:19)
      at writeOrBuffer (_stream_writable.js:394:5)
      at WriteStream.Writable.write (_stream_writable.js:294:11)
      at goToLineStart (D:\PHP\order\node_modules\webpack\lib\ProgressPlugin.js:90:27)
      at defaultHandler (D:\PHP\order\node_modules\webpack\lib\ProgressPlugin.js:74:4)
      at update (D:\PHP\order\node_modules\webpack\lib\ProgressPlugin.js:169:5)
      at moduleAdd (D:\PHP\order\node_modules\webpack\lib\ProgressPlugin.js:181:5)
      at SyncHook.eval [as call] (eval at create (D:\PHP\order\node_modules\tapable\lib\HookCodeFactory.js:19:10), &lt;anonym
  ous&gt;:7:1)
      at Compilation.buildModule (D:\PHP\order\node_modules\webpack\lib\Compilation.js:712:26)
      at factory.create (D:\PHP\order\node_modules\webpack\lib\Compilation.js:960:14)
      at factory (D:\PHP\order\node_modules\webpack\lib\NormalModuleFactory.js:409:6)
      at hooks.afterResolve.callAsync (D:\PHP\order\node_modules\webpack\lib\NormalModuleFactory.js:155:13)
      at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (D:\PHP\order\node_modules\tapable\lib\HookCodeFacto
  ry.js:33:10), &lt;anonymous&gt;:6:1)
      at AsyncSeriesWaterfallHook.lazyCompileHook (D:\PHP\order\node_modules\tapable\lib\Hook.js:154:20)
      at resolver (D:\PHP\order\node_modules\webpack\lib\NormalModuleFactory.js:138:29)
      at process.nextTick (D:\PHP\order\node_modules\webpack\lib\NormalModuleFactory.js:346:9)
      at process._tickCallback (internal/process/next_tick.js:61:11)
  Emitted 'error' event at:
      at onwriteError (_stream_writable.js:425:12)
      at onwrite (_stream_writable.js:456:5)
      at doWrite (_stream_writable.js:406:11)
      at writeOrBuffer (_stream_writable.js:394:5)
      [... lines matching original stack trace ...]
      at process._tickCallback (internal/process/next_tick.js:61:11)
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! order@1.0.0 development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-
  modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the order@1.0.0 development script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\USER\AppData\Roaming\npm-cache\_logs\2019-07-24T08_11_44_990Z-debug.log
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! order@1.0.0 watch: `npm run development -- --watch`
  npm ERR! Exit status 1
  npm ERR!`enter code here`
  npm ERR! Failed at the order@1.0.0 watch script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR! C:\Users\USER\AppData\Roaming\npm-cache\_logs\2019-07-24T08_11_45_008Z-debug.log
  </code></pre>
  
  <p>if you want see log files :</p>
  
  <p>[2019-07-24T08_11_45_008Z-debug.log]
  0 info it worked if it ends with ok</p>
  
  <p>1 verbose cli [ 'C:\Program Files\nodejs\node.exe',</p>
  
  <p>1 verbose cli   'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',</p>
  
  <p>1 verbose cli   'run',</p>
  
  <p>1 verbose cli   'watch' ]</p>
  
  <p>2 info using npm@6.4.1</p>
  
  <p>3 info using node@v10.15.3</p>
  
  <p>4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]</p>
  
  <p>5 info lifecycle order@1.0.0~prewatch: order@1.0.0</p>
  
  <p>6 info lifecycle order@1.0.0~watch: order@1.0.0</p>
  
  <p>7 verbose lifecycle order@1.0.0~watch: unsafe-perm in lifecycle true</p>
  
  <p>8 verbose lifecycle order@1.0.0~watch: PATH: C:\Program 
  Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-
  bin;D:\PHP\order\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\Users\USER\AppData\Roaming\Composer\vendor\bin;C:\Users\USER\AppData\Roaming\npm</p>
  
  <p>9 verbose lifecycle order@1.0.0~watch: CWD: D:\PHP\order</p>
  
  <p>10 silly lifecycle order@1.0.0~watch: Args: [ '/d /s /c', 'npm run development -- --watch' ]</p>
  
  <p>11 silly lifecycle order@1.0.0~watch: Returned: code: 1  signal: null</p>
  
  <p>12 info lifecycle order@1.0.0~watch: Failed to exec watch script</p>
  
  <p>13 verbose stack Error: order@1.0.0 watch: <code>npm run development -- --watch</code></p>
  
  <p>13 verbose stack Exit status 1</p>
  
  <p>13 verbose stack     at EventEmitter. (C:\Program 
  Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)</p>
  
  <p>13 verbose stack     at EventEmitter.emit (events.js:189:13)</p>
  
  <p>13 verbose stack     at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)</p>
  
  <p>13 verbose stack     at ChildProcess.emit (events.js:189:13)</p>
  
  <p>13 verbose stack     at maybeClose (internal/child_process.js:970:16)</p>
  
  <p>13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)</p>
  
  <p>14 verbose pkgid order@1.0.0</p>
  
  <p>15 verbose cwd D:\PHP\order</p>
  
  <p>16 verbose Windows_NT 6.1.7601</p>
  
  <p>17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "watch"</p>
  
  <p>18 verbose node v10.15.3</p>
  
  <p>19 verbose npm  v6.4.1</p>
  
  <p>20 error code ELIFECYCLE</p>
  
  <p>21 error errno 1</p>
  
  <p>22 error order@1.0.0 watch: <code>npm run development -- --watch</code></p>
  
  <p>22 error Exit status 1</p>
  
  <p>23 error Failed at the order@1.0.0 watch script.</p>
  
  <p>23 error This is probably not a problem with npm. There is likely additional logging output above.</p>
  
  <p>24 verbose exit [ 1, true ]</p>