-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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]: getAbsolutePath workaround fails with Node 22.12.0 #30123
Comments
** Disclaimer** This information might be inaccurate, due to it being generated automatically Temporary workaround:
// .storybook/swc-preset.mjs
export * from '@storybook/addon-webpack5-compiler-swc/preset.js';
export default {
addons: [
'./swc-preset.mjs'
// other addons...
]
};
|
The AI solution did not work. 😄 Although it got farther. |
This comment has been minimized.
This comment has been minimized.
Still fails: https://github.com/reduxjs/redux-devtools/actions/runs/12476856801/job/34941857310 It seems to be an issue with Node >=22.12.0 specifically, so maybe you're running it on different versions of Node? |
Yep, still fails for node.js 22.12.0 // .storybook/main.ts
import type { StorybookConfig } from "@storybook/react-webpack5";
import path from 'path';
const getAbsolutePath = (packageName: string): any =>
path.dirname(require.resolve(path.join(packageName, 'package.json')));
const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
getAbsolutePath("@storybook/addon-webpack5-compiler-swc"),
getAbsolutePath("@storybook/addon-essentials"),
],
framework: {
name: getAbsolutePath("@storybook/react-webpack5"),
options: {},
},
};
export default config; |
Describe the bug
Starting with Node 22.12.0, Storybook fails to build when using the getAbsolutePath solution documented here. I suspect this is related to nodejs/node#55085.
Reproduction link
https://github.com/Methuselah96/storybook-node-22-latest
Reproduction steps
npm install
npm run build-storybook
System
Additional context
No response
The text was updated successfully, but these errors were encountered: