You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run this migration script on a nextjs project: npx storybook migrate find-implicit-spies --glob="**/*.stories.@(ts|tsx)"
Upgrading from storybook: 7.4.5 to 8.0.9
Node js version: tried with 20.9.0 and 18.19.0
Tried with npx and pnpx
But it fails on all story files, here's an example error:
ERR src/components/form/SearchInput.stories.tsx Transformation error (Cannot read properties of undefined (reading 'toLowerCase'))
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at k (/Users/andrew/Projects/freelance/project/node_modules/.pnpm/@storybook+csf@0.1.4/node_modules/@storybook/csf/dist/index.js:3:2860)
at m (/Users/andrew/Projects/freelance/project/node_modules/.pnpm/@storybook+csf@0.1.4/node_modules/@storybook/csf/dist/index.js:3:3012)
at N (/Users/andrew/Projects/freelance/project/node_modules/.pnpm/@storybook+csf@0.1.4/node_modules/@storybook/csf/dist/index.js:3:3126)
at /Users/andrew/Projects/freelance/project/node_modules/.pnpm/@storybook+csf-tools@8.0.9/node_modules/@storybook/csf-tools/dist/index.js:13:610
at Array.reduce (<anonymous>)
at CsfFile.parse (/Users/andrew/Projects/freelance/project/node_modules/.pnpm/@storybook+csf-tools@8.0.9/node_modules/@storybook/csf-tools/dist/index.js:13:473)
at transform (/Users/andrew/Projects/freelance/project/node_modules/.pnpm/@storybook+codemod@8.0.9/node_modules/@storybook/codemod/dist/transforms/find-implicit-spies.js:1:3084)
All done.
Results:
58 errors
0 unmodified
0 skipped
0 ok
Additional information
$ pnpx storybook@latest doctor
🩺 The doctor is checking the health of your Storybook..
🥳 Your Storybook project looks good!
You can always recheck the health of your project by running:
npx storybook doctor
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I'm trying to run this migration script on a nextjs project:
npx storybook migrate find-implicit-spies --glob="**/*.stories.@(ts|tsx)"
Upgrading from storybook: 7.4.5 to 8.0.9
Node js version: tried with 20.9.0 and 18.19.0
Tried with
npx
andpnpx
But it fails on all story files, here's an example error:
Additional information
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions