Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

287
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!