question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed typescript compilation

See original GitHub issue

Describe the bug

Today I upgraded this library from v1.4.1 to v1.4.4 and since then I’m getting the following error during typescript build:

node_modules/livekit-client/dist/src/index.d.ts:16:33 - error TS1005: ',' expected.

16 import RemoteVideoTrack, { type ElementInfo } from './room/track/RemoteVideoTrack';
                                   ~~~~~~~~~~~

I’m not sure if this is valid syntax, but I’ve never seen a type import together with a regular one in the same statement.

Reproduction

❯ yarn tsc --version
Version 4.4.4
❯ yarn tsc
[...]

Logs

No response

System Info

System:
    OS: macOS 12.5.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 462.61 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.3/bin/npm
  Browsers:
    Chrome: 106.0.5249.119
    Firefox: 105.0.3
    Safari: 15.6.1
  npmPackages:
    livekit-client: ^1.4.4 => 1.4.4 


### Severity

annoyance

### Additional Information

_No response_

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lukasIOcommented, Oct 26, 2022

Agreed. The best case scenario would be allowing this repo to use newer typescript versions but still provide compatible .d.ts files for older typescript versions. I found https://github.com/sandersn/downlevel-dts which seems to be the main tool to achieve this. I’ll give it a try and open a PR if it works out.

1reaction
nightvisi0ncommented, Oct 27, 2022

I just checked the tsconfig but skipLibCheck is enabled in our project 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: TypeScript compilation failed · Issue #6328 - GitHub
What is the Current behavior? I start to get error after I'm trying to execute a test using this command ./node_modules/.bin/testcafe ...
Read more >
Error: TypeScript compilation failed.Cannot find name 'require'
The problem is already described in this issue in the TestCafe repository. Track it to be notified once it's updated.
Read more >
1058578 - Build failure: Typescript compilation fails - Monorail
Issue 1058578: Build failure : Typescript compilation fails ... -g typescript' results in a TypeScript version (3.8.3) and a new error:
Read more >
ts is missing from the TypeScript compilation. - Shadi Atawneh
ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
Read more >
Typescript compilation fails, possibly because Webstorm is ...
Typescript compilation fails, possibly because Webstorm is using outdated node.js. What steps will reproduce the problem?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found