Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook dep postcss-loader needs to be upgraded. #13091

Closed
glomotion opened this issue Nov 11, 2020 · 1 comment
Closed

Storybook dep postcss-loader needs to be upgraded. #13091

glomotion opened this issue Nov 11, 2020 · 1 comment

Comments

@glomotion
Copy link

Describe the bug
The dependency version of postcss-loader that is installed with storybook is too old to use newer plugins like: https://github.com/postcss/postcss-mixins

To Reproduce

  1. Init a basic storybook
  2. add the preset to ./storybook/main.js storybook-css-modules-preset
  3. set postcss.config.js to include the plugin: postcss-mixins
  4. do npm run build-storybook
  5. See error:
    ERR! Module build failed (from ./node_modules/@storybook/core/node_modules/postcss-loader/src/index.js): ERR! Error: PostCSS plugin postcss-mixins requires PostCSS 8. ERR! Migration guide for end-users: ERR! https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users

Code snippets

module.exports = {
  stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
  addons: [
    '@storybook/addon-links',
    '@storybook/addon-essentials',
    '@storybook/addon-knobs',
    'storybook-css-modules-preset',
  ],
};

System

Environment Info:

  System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
  Binaries:
    Node: 14.14.0 - ~/.nvm/versions/node/v14.14.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v14.14.0/bin/npm
  Browsers:
    Chrome: 86.0.4240.183
    Edge: 86.0.622.63
    Firefox: 80.0.1
    Safari: 14.0
  npmPackages:
    @storybook/addon-actions: ^6.0.28 => 6.0.28 
    @storybook/addon-essentials: ^6.0.28 => 6.0.28 
    @storybook/addon-knobs: ^6.0.28 => 6.0.28 
    @storybook/addon-links: ^6.0.28 => 6.0.28 
    @storybook/react: ^6.0.28 => 6.0.28 
@glomotion glomotion changed the title Storybook postcss-loader needs to be upgraded. Storybook dep postcss-loader needs to be upgraded. Nov 11, 2020
@shilman
Copy link
Member

shilman commented Nov 12, 2020

closing as dupe to #12668

@shilman shilman closed this as completed Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants