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

[Bug Report] cannot resolve lodash #5

Open
kalaivaniraju opened this issue Apr 23, 2024 · 3 comments
Open

[Bug Report] cannot resolve lodash #5

kalaivaniraju opened this issue Apr 23, 2024 · 3 comments

Comments

@kalaivaniraju
Copy link

There is a package conflict while importing lodash/debounce.

Reproducible example:

import "./App.css";
import { Dendrogram, DendrogramTree } from "@chsk/band";

function App() {
  return (
    <div className="App">
      <Dendrogram
        data={[
          {
            height: [0.25, 0.5, 0.75, 1],
            id: "data",
            keys: ["alpha", "beta", "gamma", "delta", "epsilon"],
            merge: [
              [-1, -2],
              [-4, -5],
              [-3, 2],
              [1, 3],
            ],
          },
        ]}
        variant="bottom"
      >
        <DendrogramTree />
      </Dendrogram>
      ;
    </div>
  );
}

export default App;

npm list output:

├── @chsk/[email protected]
├── @chsk/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Error:

Failed to compile.

Module not found: Error: Can't resolve 'lodash/debounce' in '.../node_modules/@chsk/core/dist'
Did you mean 'debounce.js'?
BREAKING CHANGE: The request 'lodash/debounce' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/@chsk/core/dist/chsk-core.es.js 7:0-32
Module not found: Error: Can't resolve 'lodash/debounce' in '.../node_modules/@chsk/core/dist'
Did you mean 'debounce.js'?
BREAKING CHANGE: The request 'lodash/debounce' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

webpack compiled with 1 error
No issues found.

Node version: v20.11.0

@tkonopka
Copy link
Owner

Hi @kalaivaniraju. Thanks for raising this. I'll look into it at the weekend and get back to you

@tkonopka
Copy link
Owner

Hi @kalaivaniraju and thanks again for reporting.

There is a new release with a fix - please can you try version 0.8.0 of the chsk packages?

As an aside, when drawing the dendrogram, make sure to include that component within a Chart component. See this codesandbox with an example

@kalaivaniraju
Copy link
Author

Okay great, I will try tomorrow and report back.

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

2 participants