Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

284
Visualizações
socket.io angular-cli cannot resolve 'socket.io-client/package'

I am working on a project that is using 1.0 of angular-cli and I am trying to include socket.io into that project. However, I am faced with the following errors and I am not sure how to get around them.

Error

Module not found: Error: Can't resolve 'socket.io-client/package'

There is a warning before this error is shown referring to an unexpected token from a socket.io file namely socket.io.js.map. When I look at this file it appears to be a JSON file.

Warning for socket.io.js.map

Module parse failed: D:\madlink-test-app\madlink-dongle-app-two\node_modules\socket.io-client\dist\socket.io.js.map Unexpected token (1:10) You may need an appropriate loader to handle this file type.

According to this question it seems that I need json-loader, but from what I can tell this is included automatically when using angular-cli. Any advice that is offered for this problem would be greatly appreciated.

angular-cli version: 1.0.0

tsconfig.app.json

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "module": "es2015",
    "baseUrl": "",
    "types": []
  },
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]
}
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda