Openvidu-node-client build failing


I’m facing an issue while building my app server that integrates the openvidu-node-client SDK.


  • Node: v14.19.1
  • typescript: “^3.9.10”
  • openvidu-node-client: “2.29.0”

Situation: On my local machine, the server runs fine. I can connect to it, mint tokens, and manage sessions without any problems. However, the issue arises when I attempt to build my app for deployment.

Error: While executing tsc --project ./ , I encounter multiple errors, like this:

nps is executing `transpile` : tsc --project ./
node_modules/openvidu-node-client/node_modules/axios/index.d.ts:9:18 - error TS1005: ']' expected.
9   [Key in Method as Lowercase<Key>]: AxiosHeaders;

node_modules/openvidu-node-client/node_modules/axios/index.d.ts:9:21 - error TS1005: ';' expected.

9   [Key in Method as Lowercase<Key>]: AxiosHeaders;

Here is my tsconfig.json::

    "compilerOptions": {
        "target": "es6",
        "module": "commonjs",
        "pretty": true,
        "sourceMap": true,
        "outDir": "dist",
        "importHelpers": true,
        "strict": true,
        "noImplicitAny": false,
        "strictNullChecks": false,
        "noImplicitThis": true,
        "alwaysStrict": true,
        "noUnusedLocals": true,
        "noUnusedParameters": false,
        "noImplicitReturns": true,
        "noFallthroughCasesInSwitch": true,
        "moduleResolution": "node",
        "baseUrl": ".",
        "allowSyntheticDefaultImports": true,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "resolveJsonModule": true,
        "esModuleInterop": true,
        "skipLibCheck": true,
        "lib": [

I’ve been using numerous npm packages in various projects and haven’t come across an issue like this one. Any guidance or suggestions to resolve this would be highly appreciated.

Thank you for your time and assistance!

Kind regards,

I think this could be a TypeScript issue, as openvidu-node-client is using 4.9.3 and your project 3.9.10.
Actually, with a quick search online the problem must be precisely that: recent versions of axios do not compile with such and old version of typescript (TypeError: ']' expected (v1.1.0) · Issue #5039 · axios/axios · GitHub). I would simply upgrade my TypeScript version to a more recent one.

That was it, thanks! Upgrading TypeScript to 4.9.3 solved my issues.