RangeError:运行我的 React Web 应用程序时,类型化数组长度无效:-4095

Kit*_*hma 5 npm reactjs

当我尝试使用HTTPS=true npm start命令运行应用程序时出现以下错误:

RangeError:运行我的 React Web 应用程序时,类型化数组长度无效:-4095

但是我能够使用运行该应用程序npm start

错误 - `

internal/buffer.js:788
class FastBuffer extends Uint8Array {}
^

RangeError: Invalid typed array length: -4095
    at new Uint8Array (<anonymous>)
    at new FastBuffer (internal/buffer.js:788:1)
    at Handle.onStreamRead [as onread] (internal/stream_base_commons.js:153:17)
    at Stream.<anonymous> (/Users/kithma/Documents/wellbee/wb-web/node_modules/handle-thing/lib/handle.js:120:12)
    at Stream.emit (events.js:198:15)
    at endReadableNT (/Users/kithma/Documents/wellbee/wb-web/node_modules/readable-stream/lib/_stream_readable.js:1010:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wb-web@0.1.0 start: `react-app-rewired start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the wb-web@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`
Run Code Online (Sandbox Code Playgroud)

Bar*_*kus 1

升级您的反应和反应脚本依赖项应该可以解决此问题。对我来说,碰撞之后"react": "^16.13.1"问题"react-scripts": "^3.4.1"就消失了。我也在使用节点 v12 仅供参考。