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
SB_CORE-SERVER_0007 (MainFileEvaluationError): Storybook couldn't evaluate your .storybook\main.ts file.
Original error:
Error: Transform failed with 1 error:
(define name):1:0: ERROR: Expected identifier but found "import"
at failureErrorWithLog (\node_modules\esbuild\lib\main.js:1476:15)
at responseCallbacks.<computed> (\node_modules\esbuild\lib\main.js:622:9)
at Socket.readFromStdout (\node_modules\esbuild\lib\main.js:600:7)
at Socket.emit (node:events:520:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:191:23)
at loadMainConfig (.\node_modules\@storybook\core\dist\common\index.cjs:17511:11)
at async buildDevStandalone (.\node_modules\@storybook\core\dist\core-server\index.cjs:37134:11)
at async withTelemetry (.\node_modules\@storybook\core\dist\core-server\index.cjs:35757:12)
at async dev (.\node_modules\@storybook\core\dist\cli\bin\index.cjs:2591:3)
at async s.<anonymous> (.\node_modules\@storybook\core\dist\cli\bin\index.cjs:2643:74)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
I use next js version 14
I found answers for Vite but couldn't find one that suited me
** Disclaimer** This information might be inaccurate, due to it being generated automatically
This error occurs because esbuild is unable to process the TypeScript imports in your .storybook/main.ts file. For Next.js 14, modify your .storybook/main.ts to use the following format:
Describe the bug
when I try to run it gives an error:
I use next js version 14
I found answers for Vite but couldn't find one that suited me
Reproduction link
https://stackblitz.com/edit/github-p7lfsqcw?file=.storybook%2Fmain.ts,.storybook%2Fpreview.ts&preset=node
Reproduction steps
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: