Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on communication-calling package #64

Closed
canperk opened this issue May 30, 2021 · 2 comments
Closed

Build fails on communication-calling package #64

canperk opened this issue May 30, 2021 · 2 comments

Comments

@canperk
Copy link

canperk commented May 30, 2021

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

node_modules/@azure/communication-calling/dist-esm/sdk.bundle.js:18:13900: error: Cannot assign to "i" because it is a constant

Expected/desired behavior

Project builds

OS and Version?

Windows 10

Versions

1.0.0

Mention any other details that might be useful

I created and with:

npm init @vitejs/app peerque --template vue-ts

Then I added following packages to package.json to be able to test SDK functions.

    "@azure/communication-calling": "1.0.0",
    "@azure/communication-common": "1.0.0",
    "@azure/communication-identity": "1.0.0"

I have a simple page that imports @azure/communication-calling but when I try to build project it fails with error hat I wrote above.

When I change const to let in the source code build passes. I don't know if it is related to my tsconfig.json or not. I will share it just in case.

{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "moduleResolution": "node",
    "strict": true,
    "jsx": "preserve",
    "sourceMap": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "lib": ["esnext", "dom"]
  },
  "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
  "exclude": ["node_modules", "dist"]
}

Thanks in advance

@JamesBurnside
Copy link
Contributor

Followed the same steps and was able to repo.

Setup Steps:

> npm init @vitejs/app peerque --template vue-ts
> cd peerque
> npm i
> npm i @azure/communication-calling@1.0.0 @azure/communication-common@1.0.0 @azure/communication-identity@1.0.0
> npm run dev

Repro steps:
In main.ts add:

import * as communication_calling from '@azure/communication-calling';
console.log(communication_calling);

Reload page.

Result:

11:12:15 a.m. [vite] new dependencies found: @azure/communication-calling, updating...
 > node_modules/@azure/communication-calling/dist-esm/sdk.bundle.js:18:13900: error: Cannot assign to "i" because it is a constant
    18 │ ...e),n=!1)},dispose:()=>{i=void 0}}}function asse...
       ╵                           ^
   node_modules/@azure/communication-calling/dist-esm/sdk.bundle.js:18:13765: note: "i" was declared a constant here
    18 │ ...r(){let e,t,n=!0;const i=new Promise(((n,i)=>{e...
       ╵                           ^

This is a bug in the SDK and not in the calling-sample (this repo).

Creating bug new bug in their repo...

@JamesBurnside
Copy link
Contributor

Issue created here Azure/azure-sdk-for-js#15479, @canperk can you subscribe to notifications on this new issue and the corresponding team should follow up with you shortly.

Closing this as duplicate of the newly created issue Azure/azure-sdk-for-js#15479.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants