When launching my storybook with the latest version of storybook-addon-module-mock i get this error on stories where i have translation using variables:
Error: INVALID_MESSAGE: Cannot read properties of undefined (reading 'date')
at getFallbackFromErrorAndNotify (createFormatter-56ef3976.js:152:1)
at translateBaseFn (createFormatter-56ef3976.js:209:1)
at translateFn (createFormatter-56ef3976.js:239:1)
at NextIntlTest ((index):16:1)
at renderWithHooks (react-dom.development.js:11009:1)
at mountIndeterminateComponent (react-dom.development.js:16761:1)
at beginWork$1 (react-dom.development.js:18345:1)
at beginWork (react-dom.development.js:26741:1)
at performUnitOfWork (react-dom.development.js:25587:1)
at workLoopSync (react-dom.development.js:25303:1)
defaultOnError @ initializeConfig-c503e215.js:74
getFallbackFromErrorAndNotify @ createFormatter-56ef3976.js:153
translateBaseFn @ createFormatter-56ef3976.js:209
translateFn @ createFormatter-56ef3976.js:239
NextIntlTest @ (index):16
renderWithHooks @ react-dom.development.js:11009
mountIndeterminateComponent @ react-dom.development.js:16761
beginWork$1 @ react-dom.development.js:18345
beginWork @ react-dom.development.js:26741
performUnitOfWork @ react-dom.development.js:25587
workLoopSync @ react-dom.development.js:25303
renderRootSync @ react-dom.development.js:25258
performConcurrentWorkOnRoot @ react-dom.development.js:24382
workLoop @ scheduler.development.js:261
flushWork @ scheduler.development.js:230
performWorkUntilDeadline @ scheduler.development.js:534
...
Current Behavior
When launching my storybook with the latest version of
storybook-addon-module-mock
i get this error on stories where i have translation using variables:GitHub Repo
https://github.com/sebpalluel/storybook-rsc-demo-next-intl-module-mock
Steps to Reproduce
pnpm i
pnpm dev
It will display the next app with correct translationspnpm storybook
and go to http://localhost:6006/?path=/story/nextintltest--defaultThe text
Hello World!
is correctly displayed but the one bellow with the variableThis is a text with a number 10
If i remove 'storybook-addon-module-mock' from the storybook addons it's displaying correctly.
Operating System
Additional Information
This repo is a fork of the original demo for RSC: https://github.com/shilman/storybook-rsc-demo