Search code examples
node.jsazure-communication-services

Azure Communication Services Web Calling in Blazor - issues with npm


I'm trying to use Azure Communications Service for web calling. Looks like the only examples I can find require node.js. I'm getting errors with npm. I'm very new with npm. I'm getting hundreds of errors with the base error being "error TS2300: Build:Duplicate identifier"

Here is my package.json

  "name": "npmjs",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "build:dev": "webpack-dev-server --config webpack.dev.js",
    "build:prod": "webpack --config webpack.prod.js",
    "build": "webpack ./src/index.js --output-path ../wwwroot --output-filename index.bundle.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "@azure/communication-calling": "^1.4.4",
    "@azure/communication-common": "^2.0.0"
  },
  "devDependencies": {
    "webpack": "^4.42.0",
    "webpack-cli": "^3.3.11",
    "webpack-dev-server": "^3.10.3"
  }
}

Solution

  • I added a blank typescript file to the src directory. I named it index.ts. After this change, the program started compiling correctly