Angular 角度:类型错误:无法读取属性';拆封';未定义的。添加bufferutil';行不通
在我的Spring Angular项目中,我面临以下问题:Angular 角度:类型错误:无法读取属性';拆封';未定义的。添加bufferutil';行不通,angular,node-modules,package.json,Angular,Node Modules,Package.json,在我的Spring Angular项目中,我面临以下问题: if (mask != null && buf != null) bufferUtil.unmask(buf, mask); ^ TypeError: Cannot read property 'unmask' of undefined at Receiver.unmask (D:\build\no
if (mask != null && buf != null) bufferUtil.unmask(buf, mask);
^
TypeError: Cannot read property 'unmask' of undefined
at Receiver.unmask (D:\build\node_modules\browser-sync\node_modules\ws\lib\Receiver.js:306:47)
at Receiver.finish (D:\build\node_modules\browser-sync\node_modules\ws\lib\Receiver.js:505:25)
at Receiver.expectHandler (D:\build\node_modules\browser-sync\node_modules\ws\lib\Receiver.js:493:33)
at Receiver.add (D:\build\node_modules\browser-sync\node_modules\ws\lib\Receiver.js:103:24)
at Socket.realHandler (D:\build\node_modules\browser-sync\node_modules\ws\lib\WebSocket.js:825:20)
at Socket.emit (events.js:321:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
我在网上读到,添加bufferutil依赖项应该会有所帮助,但在我的例子中没有。下面是我在package.json中的依赖项列表
我还尝试升级一些依赖项,但这个错误不会消失。请注意,应用程序仍在浏览器中启动,并且似乎正在运行。你有什么想法吗?谢谢 你看到这个链接了吗?似乎bufferutil@2
仅与ws@>=2.0.2
兼容。
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/cdk": "^5.2.0",
"@angular/common": "5.2.0",
"@angular/compiler": "5.2.0",
"@angular/core": "5.2.0",
"@angular/forms": "5.2.0",
"@angular/http": "^5.0.0",
"@angular/material": "^5.2.0",
"@angular/material-moment-adapter": "^6.4.7",
"@angular/platform-browser": "5.2.0",
"@angular/platform-browser-dynamic": "5.2.0",
"@angular/router": "5.2.0",
"@mdi/font": "^2.8.94",
"@ng-bootstrap/ng-bootstrap": "1.0.0",
"@stomp/ng2-stompjs": "^4.0.1",
"bootstrap": "4.4.0",
"bufferutil": "4.0.1",
"chart.js": "^2.7.2",
"chartjs-plugin-annotation": "^0.5.7",
"chartjs-plugin-datalabels": "^0.4.0",
"core-js": "2.4.1",
"file-saver": "^1.3.8",
"font-awesome": "4.7.0",
"hammerjs": "^2.0.8",
"jquery": "3.3.0",
"moment": "^2.22.2",
"ng-jhipster": "0.5.0",
"ng2-charts": "^1.6.0",
"ngc-float-button": "^1.2.1",
"ngx-cookie": "2.0.1",
"ngx-infinite-scroll": "0.9.0",
"ngx-webstorage": "^2.0.1",
"node-sass": "^4.13.1",
"reflect-metadata": "0.1.13",
"rxjs": "5.5.12",
"sass": "^1.25.0",
"socket.io": "2.3.0",
"sockjs-client": "1.5.0",
"stompjs": "^2.3.3",
"swagger-ui": "2.2.10",
"tether": "1.4.7",
"ws": "^7.3.1",
"zone.js": "0.11.1"
},