DoctorMcKay / node-websocket13

Lightweight pure-JS websocket support
https://www.npmjs.com/package/websocket13
MIT License
4 stars 1 forks source link

bytebuffer have problem on next.js #4

Closed piyanggoon closed 11 months ago

piyanggoon commented 11 months ago

Module not found: Can't resolve 'memcpy' in 'xxx/node_modules/bytebuffer/dist'

Import trace for requested module: ./node_modules/bytebuffer/dist/bytebuffer-node.js ./node_modules/websocket13/dist/streams/StreamedOutgoingMessage.js ./node_modules/websocket13/dist/index.js ./node_modules/steam-session/dist/transports/WebSocketCMTransport.js ./node_modules/steam-session/dist/LoginSession.js ./node_modules/steam-session/dist/index.js ./node_modules/steamcommunity/components/login.js ./node_modules/steamcommunity/index.js ./src/app/api/steam/tradeurl/route.ts

piyanggoon commented 11 months ago

problem is bytebuffer use memcpy i try npm install by external project still build fail, i try set memcpy = null and link all package-lock.json to my own file it can compile without error.

DoctorMcKay commented 11 months ago

websocket13 does not work in the browser. Use the regular WebSocket constructor.