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

yarn dev #25

Open
sublime247 opened this issue Dec 18, 2024 · 1 comment
Open

yarn dev #25

sublime247 opened this issue Dec 18, 2024 · 1 comment

Comments

@sublime247
Copy link

After cloning the repo and runnng yarn dev, I get this error
'''
Re-optimizing dependencies because lockfile has changed

VITE v5.2.12 ready in 317 ms

➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
✘ [ERROR] Could not resolve "lodash"

node_modules/@kaiachain/kaia-design-system/dist/index.esm.js:1:213:
  1 │ ...ct as s,cloneElement as u}from"react";import f from"lodash";function d(e,n){(null==n||n>e.length)&&(n=e.length...
    ╵                                                       ~~~~~~~~

The Yarn Plug'n'Play manifest forbids importing "lodash" here because it's not listed as a
dependency of this package:

../.pnp.cjs:3598:31:
  3598 │         "packageDependencies": [\
       ╵                                ~~

You can mark the path "lodash" as external to exclude it from the bundle, which will remove this
error and leave the unresolved path in the bundle.

/Users/bashir/Documents/kaia-design-system/example/node_modules/esbuild/lib/main.js:1651
let error = new Error(text);
^

Error: Build failed with 1 error:
node_modules/@kaiachain/kaia-design-system/dist/index.esm.js:1:213: ERROR: Could not resolve "lodash"
at failureErrorWithLog (/Users/bashir/Documents/kaia-design-system/example/node_modules/esbuild/lib/main.js:1651:15)
at /Users/bashir/Documents/kaia-design-system/example/node_modules/esbuild/lib/main.js:1059:25
at /Users/bashir/Documents/kaia-design-system/example/node_modules/esbuild/lib/main.js:1527:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}

'''

kindly look into this
Thanks

@skqksh
Copy link
Collaborator

skqksh commented Dec 18, 2024

@sublime247
Thank you for reporting the issue.

Please try again using the latest version, v1.0.6.
Also, make sure that the commands in the ReadMe, such as yarn install and yarn link, have been executed correctly.

Previously, lodash was being referenced through hoisting by another library (babel-plugin-lodash). Depending on the local environment, this could lead to either normal functionality or the issue you reported. To prevent this and ensure consistent behavior, we have explicitly added lodash to the dependencies, resolving the issue.

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