node.js - Angular 4 Scoket io webpack error -


i have installed socket.io , typings in angular 4. new angular 4. every time try ng server bellow errors

  npm --save @types/socket.io   npm install --save express body-parser http-status mongoose socket.io 

imported in component

 import * io 'socket.io-client'; 

on ng server following errors. can me out fix this.

 error in ./~/socket.io-client/lib/index.js module not found: error: can't resolve 'socket.io-parser' in 'h:\users\home\desktop\routing-final\node_modules\socket.io-client\lib'  @ ./~/socket.io-client/lib/index.js 7:13-40  @ ./src/app/servers/servers.component.ts  @ ./src/app/app.module.ts  @ ./src/main.ts  @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts  error in ./~/socket.io-client/lib/manager.js module not found: error: can't resolve 'socket.io-parser' in 'h:\users\home\desktop\routing-final\node_modules\socket.io-client\lib'  @ ./~/socket.io-client/lib/manager.js 9:13-40  @ ./~/socket.io-client/lib/index.js  @ ./src/app/servers/servers.component.ts  @ ./src/app/app.module.ts  @ ./src/main.ts  @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts  error in ./~/socket.io-client/lib/socket.js module not found: error: can't resolve 'socket.io-parser' in 'h:\users\home\desktop\routing-final\node_modules\socket.io-client\lib'  @ ./~/socket.io-client/lib/socket.js 6:13-40  @ ./~/socket.io-client/lib/index.js  @ ./src/app/servers/servers.component.ts  @ ./src/app/app.module.ts  @ ./src/main.ts  @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts  error in ./~/socket.io-client/lib/manager.js module not found: error: can't resolve 'engine.io-client' in 'h:\users\home\desktop\routing-final\node_modules\socket.io-client\lib'  @ ./~/socket.io-client/lib/manager.js 6:10-37  @ ./~/socket.io-client/lib/index.js  @ ./src/app/servers/servers.component.ts  @ ./src/app/app.module.ts  @ ./src/main.ts  @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts  error in ./~/socket.io-client/lib/manager.js module not found: error: can't resolve 'component-emitter' in 'h:\users\home\desktop\routing-final\node_modules\socket.io-client\lib'  @ ./~/socket.io-client/lib/manager.js 8:14-42  @ ./~/socket.io-client/lib/index.js  @ ./src/app/servers/servers.component.ts  @ ./src/app/app.module.ts  @ ./src/main.ts  @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts  error in ./~/socket.io-client/lib/socket.js module not found: error: can't resolve 'component-emitter' in 'h:\users\home\desktop\routing-final\node_modules\socket.io-client\lib'  @ ./~/socket.io-client/lib/socket.js 7:14-42  @ ./~/socket.io-client/lib/index.js  @ ./src/app/servers/servers.component.ts  @ ./src/app/app.module.ts  @ ./src/main.ts  @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts webpack: failed compile. 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -