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

Cannot use with docz-core 0.12.x #11

Open
skovy opened this issue Dec 13, 2018 · 2 comments
Open

Cannot use with docz-core 0.12.x #11

skovy opened this issue Dec 13, 2018 · 2 comments

Comments

@skovy
Copy link

skovy commented Dec 13, 2018

Bug Report

Describe the bug

When upgrading to [email protected] the docz-plugin-css no longer works with yarn docz dev

To Reproduce

  1. Install [email protected] and [email protected]
  2. Run yarn docz dev
  3. Setup a basic example using docz-plugin-css
  4. See the errors
ERROR  Failed to compile with 1 errors                                                                                    

This dependency was not found:

* webpack-hot-client/client?612c344c-f04d-4637-984c-bdd09dbde9cf in multi webpack-hot-client/client?612c344c-f04d-4637-984c-bdd09dbde9cf ./node_modules/@babel/polyfill/lib/index.js ./.docz/app/index.jsx

To install it, you can run: npm install --save webpack-hot-client/client?612c344c-f04d-4637-984c-bdd09dbde9cf

doczrc.js

This is what the doczrc.js config looks like (to see the css config)

import { css } from "docz-plugin-css";

export default {
  title: ".....",
  description: "...",
  typescript: true,
  themeConfig: {
    colors: {
      primary: "#ccc"
    }
  },
  plugins: [
    css({
      preprocessor: "sass",
      cssmodules: true,
      cssOpts: {
        camelCase: "only"
      }
    })
  ]
};

Expected behavior

docz-plugin-css should work with [email protected].

Environment

Additional context/Screenshots

I suspect the issue is having two different versions of docz-core installed.

yarn why docz-core
yarn why v1.9.4
[1/4] 🤔  Why do we have the module "docz-core"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
   - "docz-plugin-css" depends on it
   - Hoisted from "docz-plugin-css#docz-core"
info Disk size without dependencies: "6.87GB"
info Disk size with unique dependencies: "6.87GB"
info Disk size with transitive dependencies: "6.87GB"
info Number of shared dependencies: 514
=> Found "docz#[email protected]"
info This module exists because "docz" depends on it.
info Disk size without dependencies: "248MB"
info Disk size with unique dependencies: "248MB"
info Disk size with transitive dependencies: "248MB"
info Number of shared dependencies: 532
✨  Done in 1.88s.

Short-term fix

I was able to temporarily work around this issue by forcing docz-plugin-css to resolve to [email protected] and it seems compatible by adding this in the package.json:

  ...
 "resolutions": {
    "docz-core": "0.12.16"
  },
  ...
@kachkaev
Copy link

kachkaev commented Jan 10, 2019

Same problem here with [email protected]. I had to add {"resolutions": {"**/docz-core": "^0.13.0"} to package.json to make sure that there's only one copy of docz-core package. Otherwise, both 0.11 and 0.13 are installed.

@hershmire
Copy link

Is this package being maintained anymore? It's not compatible with the latest docz as it references a very old version of docz-core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants