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

[Bug]: Throw compile error using tsconfig multiple extend #24010

Closed
anneau opened this issue Aug 30, 2023 · 2 comments
Closed

[Bug]: Throw compile error using tsconfig multiple extend #24010

anneau opened this issue Aug 30, 2023 · 2 comments

Comments

@anneau
Copy link
Contributor

anneau commented Aug 30, 2023

Describe the bug

TypeScript5.0 provides the ability to extend from multiple configs at once.

https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-rc/#supporting-multiple-configuration-files-in-extends

But Storybook throw error on using this.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at new NodeError (node:internal/errors:405:5)
    at validateString (node:internal/validators:162:11)
    at Object.join (node:path:1175:7)
    at loadTsconfig (./node_modules/esbuild-register/dist/node.js:4232:37)
    at loadSyncDefault (./node_modules/esbuild-register/dist/node.js:4178:18)
    at tsConfigLoader (./node_modules/esbuild-register/dist/node.js:4165:22)
    at configLoader (./node_modules/esbuild-register/dist/node.js:4493:22)
    at loadConfig2 (./node_modules/esbuild-register/dist/node.js:4476:12)
    at registerTsconfigPaths (./node_modules/esbuild-register/dist/node.js:4752:67)
    at register (./node_modules/esbuild-register/dist/node.js:4884:35)
    at interopRequireDefault (./node_modules/@storybook/core-common/dist/index.js:32:3142)
    at serverRequire (./node_modules/@storybook/core-common/dist/index.js:37:373)
    at loadMainConfig (./node_modules/@storybook/core-common/dist/index.js:50:6889)
    at async buildDevStandalone (./node_modules/@storybook/core-server/dist/index.js:116:1244)
    at async withTelemetry (./node_modules/@storybook/core-server/dist/index.js:101:4155)
    at async dev (./node_modules/@storybook/cli/dist/generate.js:502:401)
    at async Command.<anonymous> (./node_modules/@storybook/cli/dist/generate.js:504:225)

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.

To Reproduce

https://stackblitz.com/edit/github-jrbz2p?file=tsconfig.json

System

Environment Info:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 16.20.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
  npmPackages:
    @storybook/addon-essentials: ^7.4.0 => 7.4.0 
    @storybook/addon-interactions: ^7.4.0 => 7.4.0 
    @storybook/addon-links: ^7.4.0 => 7.4.0 
    @storybook/addon-onboarding: ^1.0.8 => 1.0.8 
    @storybook/blocks: ^7.4.0 => 7.4.0 
    @storybook/nextjs: ^7.4.0 => 7.4.0 
    @storybook/react: ^7.4.0 => 7.4.0 
    @storybook/testing-library: ^0.2.0 => 0.2.0

Additional context

No response

@anneau anneau changed the title [Bug]: [Bug]: Throw compile error using tsconfig multiple extend Aug 30, 2023
@anneau
Copy link
Contributor Author

anneau commented Aug 31, 2023

I have confirmed that this issue is caused by an esbuild problem.

evanw/esbuild#3019

@anneau
Copy link
Contributor Author

anneau commented Aug 31, 2023

same as #21792 (comment)
close this.

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

No branches or pull requests

1 participant