tsconfig / bases

Hosts TSConfigs to extend in a TypeScript app, tuned to a particular runtime environment
MIT License
6.4k stars 240 forks source link

Other package build process error TS6046 since commit 4c413cf #192

Closed SylvainSoKette closed 1 year ago

SylvainSoKette commented 1 year ago

I'm using OpenVidu's fork of mediasoup-sdp-bridge and it started spouting typescript errors starting a few days ago.

After much pocking around, I finally understood that it came down to @tsconfig/node16 having received a commit very recently.

Here is the errror which halts the build process:

> mediasoup-sdp-bridge@3.6.5 typescript:build
> node npm-scripts.js typescript:build

npm-scripts.js [INFO] running task "typescript:build"
npm-scripts.js [INFO] executing command: tsc
node_modules/@tsconfig/node16/tsconfig.json:7:15 - error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'esnext'.

7     "module": "Node16",
                ~~~~~~~~

Found 1 error.

As I understand, mediasoup-sdp-bridge is using a version of Typescript that is incompatible with tsconfig ? Or is there something wrong with tsconfig ?

orta commented 1 year ago

Yep, you need to use a newer version of TypeScript (or an older tsconfig base)

SylvainSoKette commented 1 year ago

Thanks, I'll raise the issue to the guys at OpenVidu then :)

Edit: To anyone trying to fix this, it requires fixing typescript version to >=4.7 in the project importing @tsconfig/node16

cruizba commented 1 year ago

@SylvainSoKette , I've updated the typescript version at: https://github.com/OpenVidu/mediasoup-sdp-bridge

It should work now.