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
Upgrade to TS5.0 #21792
Comments
For anyone who wants to use multiple array extends feature in TS 5.0, you'll get a error when running TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array Issue was fixed in dividab/tsconfig-paths#245 , but is still a issue until we can upgrade esbuild-register (egoist/esbuild-register#91) with the fix. I managed to set a resolution with the precompiled package update in my project. https://github.com/psychobolt/vite-storybook-boilerplate/tree/main/packages/esbuild-register "resolutions": {
"esbuild-register": "workspace:*"
} |
I applied the following patch in patch-package and it worked! https://gist.github.com/naporin0624/70c2e00f791d881895910a8f2cdb3026 |
Storybook 7 for Vite does not yet support TypeScript 5 (specifically the I was able to fix this by overriding Storybook in my "overrides": {
"vue-docgen-api": "^4.73.0"
}, |
I'm still waiting for I believe it would be a good idea to explore alternative options if available. It's frustrating that Storybook still doesn't support array extends! |
@custardcream98 what isn't working for you? Do you have a reproduction you can share? This issue is about updating the storybook monorepo to TS5. I'm pretty sure it should work fine in user projects (but have not verified--I'm on my phone) |
@custardcream98 gotcha--thanks for clarifying |
@kasperpeulen this is now no longer blocked by esbuild-register |
@custardcream98 does this now work in 7.5.0-alpha.3 and above for you? |
I have an error when using the mentioned above
|
tsconfig: {
"compilerOptions": {
"baseUrl": ".",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"jsx": "react-jsx",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": false,
"noImplicitThis": false,
"paths": {
"@/*": ["src/*"]
},
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"target": "esnext"
},
"include": [
"src"
],
"exclude": [
"node_modules",
"dist",
"**/*.stories.{ts,tsx}"
],
"ts-node": {
"compilerOptions": {
"module": "CommonJS"
}
}
} |
package.json:
|
import { StorybookConfig } from '@storybook/react-webpack5';
const storybookConfig: StorybookConfig = {
stories: ['../src'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: true,
},
features: {
buildStoriesJson: true,
},
}
export default storybookConfig; |
@shilman please let me know where should I look at? |
Long term, we'll want to:
Originally posted by @ndelangen in #21276 (comment)
The text was updated successfully, but these errors were encountered: