我正在使用npm install socket.io-stream\n 我在我的角度组件上实现socket.io-stream如下所示:
import * as io from 'socket.io-client';\nimport * as ss from 'socket.io-stream';\nRun Code Online (Sandbox Code Playgroud)\n\n我只想创建一个像这样的双工流:
\n\nstream=ss.createStream();\nRun Code Online (Sandbox Code Playgroud)\n\n当我运行时出现此错误ng build:
ERROR in ./node_modules/socket.io-stream/lib/iostream.js\nModule not found: Error: Can't resolve 'stream' in ' \n'C:\\Users\\geoffroy\\Documents\\Mines Al\xc3\xa8s\\2A\\Stage\\WebService based \nGUI\\WebApp\\node_modules\\socket.io-stream\\lib'\nERROR in ./node_modules/socket.io-stream/lib/blob-read-stream.js\nModule not found: Error: Can't resolve 'stream' in \n'C:\\Users\\geoffroy\\Documents\\Mines Al\xc3\xa8s\\2A\\Stage\\WebService based \nGUI\\WebApp\\node_modules\\socket.io-stream\\lib'\nRun Code Online (Sandbox Code Playgroud)\n\n我不明白,因为在我的 server.js 上它似乎有效..
\n\n我尝试运行该命令npm install stream,但没有出现错误ng build。但是当我启动我的应用程序时,我的浏览器控制台中出现了一个新错误:
inherits_browser.js:5 Uncaught TypeError: Cannot read property 'prototype' of …Run Code Online (Sandbox Code Playgroud)