Closed amosbastian closed 2 years ago
Hey @amosbastian, this is likely happening because @prismicio/next
is published as an ES Module (using "type": "module"
in its package.json
).
Storybook and/or its Webpack 5 configuration does not seem to work well with ES Modules and .mjs
files.
The next version of @prismicio/next
will remove "type": "module"
which should fix this problem. I'll post here once it's published. 🙂
@amosbastian Could you try v0.1.2
? It includes the fix that I mentioned above.
I'm going to close this issue as it should be fixed, but please let me know if it isn't and I'll reopen it.
It works now, thanks! ❤️
I'm not sure if this is solely caused by
@prismicio/next
, but I am getting this error since migrating our codebase to use it. Since the slice simulator is also broken for me (see https://github.com/prismicio/slice-machine/issues/430), I still need Storybook.The full error is:
Versions
Reproduction
Additional Details
Steps to reproduce
Run Storybook with Webpack 5 and
@prismicio/next
installed.What is expected?
It should run.
What is actually happening?
It is giving an error about
next/router
.