正常执行yarn & yarn dev,别人能启动,我却报错如下:
yarn run v1.22.4
$ webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --public --disableHostCheck=true
10% building modules 7/10 modules 3 active …rm/Matrix-Web/src/plugins/dragResize.jsinternal/buffer.js:945
class FastBuffer extends Uint8Array {}
^
RangeError: Invalid typed array length: -4095
at new Uint8Array (<anonymous>)
at new FastBuffer (internal/buffer.js:945:1)
at Handle.onStreamRead [as onread] (internal/stream_base_commons.js:185:19)
at Stream.<anonymous> (/Users/gmchen/MyProgram/git_devops/webstorm/Matrix-Web/node_modules/handle-thing/lib/handle.js:120:12)
at Stream.emit (events.js:327:22)
at endReadableNT (/Users/gmchen/MyProgram/git_devops/webstorm/Matrix-Web/node_modules/readable-stream/lib/_stream_readable.js:1010:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
初步怀疑是自己yarn的问题,卸载清空再重装,报错依旧;
难道yarn没有本地执行权限?于是执行如下:
sudo yarn dev
结果启动浏览器谈警告如下
自签名证书的问题?于是注释掉相关逻辑,再执行yarn dev发现可行。