2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

httpsのwebpack-dev-serverにアクセスするとRangeErrorで落ちる

Last updated at Posted at 2019-01-01

tl;dr

node が v11.1 以上で起こるので、 node を v10 に下げる。

事象

webpack-dev-server --https で起動後に、そこ ( https://localhost:3035/ など) にアクセスすると、お漏らしして落ちる。

(略)
webpack: Compiled successfully.
buffer.js:72
class FastBuffer extends Uint8Array {}
^

RangeError: Invalid typed array length: -4095
    at new Uint8Array (<anonymous>)
    at new FastBuffer (buffer.js:72:1)
    at Handle.onStreamRead [as onread] (internal/stream_base_commons.js:121:17)
    at Stream.<anonymous> (/Users/nzapponi/Git Repositories/Quip/meeting-scheduler/node_modules/handle-thing/lib/handle.js:120:12)
    at Stream.emit (events.js:187:15)
    at endReadableNT (/Users/nzapponi/Git Repositories/Quip/meeting-scheduler/node_modules/readable-stream/lib/_stream_readable.js:1010:12)
    at process.internalTickCallback (internal/process/next_tick.js:72:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1

( https://github.com/webpack/webpack-dev-server/issues/1592 よりエラー内容を引用 )

解決

n で node を v10 にする。

$ sudo n lts

node の version 変更したら忘れず yarn or npm install をやる。

参考

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?