Nuxt Tutorial Series Error Adding Storybook

Hi there,

I've been following along with the Nuxt tutorial series here and am running into an issue when trying to install storybook. After running the following command:

prismic sm --add-storybook

I get the following error:

ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'order'.

FATAL  Failed to run command nuxt-storybook:
Error: Command failed with exit code 1: nuxt-storybook

Here are the versions of my installs:
prismic-cli: 3.8.13
node: v15.10.0
nuxt: "^2.15.3"
"@nuxtjs/storybook": "^4.0.2"

Hey Team,

I'm sorry to see you're running into this issue. I'm investigating this now and I'll get back to you once I recreate the issue on my end.


Thanks @Phil,

Just following up if you've been able to reproduce this at all?

Ok we ended up solving the issue. It seems that nuxt-storybook may have been updated to use PostCSS@version 8 and I think maybe the way the Prismic CLI was adding it, was likely still on a version below this.

Anyway for anyone who stumbles upon this in the future we just had to manually add PostCSS to our dependencies like so:

yarn add -D postcss@^8

Hey Team,

I'm sorry I never managed to find time to investigate this. Thank you so much for finding the issue though, I'm planning to update the Tutorial series to work from a boilerplate so we can avoid issues like this.

Thanks again.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.