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]: package conflicts when installing @evidence-dev/labs #2898

Open
vshlemon opened this issue Dec 12, 2024 · 0 comments
Open

[Bug]: package conflicts when installing @evidence-dev/labs #2898

vshlemon opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working to-review Evidence team to review

Comments

@vshlemon
Copy link

Describe the bug

After trying to install https://labs.evidence.dev via. npm install --save @evidence-dev/labs. I received conflict issues

❯ npm install --save @evidence-dev/labs
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/svelte
npm error   svelte@"4.2.19" from @evidence-dev/[email protected]
npm error   node_modules/@evidence-dev/component-utilities
npm error     @evidence-dev/component-utilities@"3.2.23" from @evidence-dev/[email protected]
npm error     node_modules/@evidence-dev/core-components
npm error       @evidence-dev/core-components@"^4.9.2" from the root project
npm error   peer svelte@"^4.2.19" from @evidence-dev/[email protected]
npm error   node_modules/@evidence-dev/core-components
npm error     @evidence-dev/core-components@"^4.9.2" from the root project
npm error   20 more (@evidence-dev/evidence, @evidence-dev/preprocess, ...)
npm error
npm error Could not resolve dependency:
npm error @evidence-dev/labs@"*" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/svelte
npm error   peer svelte@"^3.54.0" from @evidence-dev/[email protected]
npm error   node_modules/@evidence-dev/labs
npm error     @evidence-dev/labs@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error ~/.npm/_logs/2024-12-12T09_58_10_573Z-eresolve-report.txt
npm error A complete log of this run can be found in: ~/.npm/_logs/2024-12-12T09_58_10_573Z-debug-0.log

Which I tried to resolve by running npm install --save @evidence-dev/labs --legacy-peer-deps (without knowing what this does).

Now I can no longer use npm run dev to start up the evidence server.

I get the following errors when my evidence.plugins.yaml contains "@evidence-dev/labs": {} under the components section.

❯ npm run dev

> [email protected] dev
> evidence dev --open /

Failed to load component plugins Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in .../node_modules/@evidence-dev/labs/package.json
    at exportsNotFound (node:internal/modules/esm/resolve:296:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:586:13)
    at resolveExports (node:internal/modules/cjs/loader:639:36)
    at Module._findPath (node:internal/modules/cjs/loader:747:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1234:27)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at loadPluginPackage (.../node_modules/@evidence-dev/sdk/src/plugins/loadPluginPackage.js:14:75)
    at .../node_modules/@evidence-dev/sdk/src/plugins/components/loadComponentPlugins.js:36:23
    at Array.map (<anonymous>)
    at loadComponentPlugins (.../node_modules/@evidence-dev/sdk/src/plugins/components/loadComponentPlugins.js:35:39) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
error when starting dev server:
Error: Could not resolve peer dependency "@sveltejs/vite-plugin-svelte" relative to your project — please install it and try again.
    at resolve_peer_dependency (.../node_modules/@sveltejs/kit/src/utils/import.js:16:9)
    at sveltekit (.../node_modules/@sveltejs/kit/src/exports/vite/index.js:157:27)
    at async Promise.all (index 0)
    at async asyncFlatten (.../node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:17501:12)
    at async resolveConfig (.../node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:66166:27)
    at async _createServer (.../node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:62758:18)
    at async CAC.<anonymous> (.../node_modules/vite/dist/node/cli.js:735:20)

And when evidence.plugins.yaml does not contain "@evidence-dev/labs": {} under the components section. I get

❯ npm run dev

> [email protected] dev
> evidence dev --open /

error when starting dev server:
Error: Could not resolve peer dependency "@sveltejs/vite-plugin-svelte" relative to your project — please install it and try again.
    at resolve_peer_dependency (.../node_modules/@sveltejs/kit/src/utils/import.js:16:9)
    at sveltekit (.../node_modules/@sveltejs/kit/src/exports/vite/index.js:157:27)
    at async Promise.all (index 0)
    at async asyncFlatten (.../node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:17501:12)
    at async resolveConfig (.../node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:66166:27)
    at async _createServer (.../node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:62758:18)
    at async CAC.<anonymous> (.../node_modules/vite/dist/node/cli.js:735:20)

I then ran npm install @sveltejs/vite-plugin-svelte and got more errors. I don't know enough about npm & svelte dependencies etc to troubleshoot.

Steps to Reproduce

  • npm install --save @evidence-dev/labs
  • npm install --save @evidence-dev/labs --legacy-peer-deps
  • include "@evidence-dev/labs": {} under components: section of evidence.plugins.yaml ... or don't and then run
  • npm run dev

Logs

System Info

Severity

blocking all usage of Evidence

Additional Information, or Workarounds

I don't know how to get back to the original installation state of evidence now so I can't use it at all

@vshlemon vshlemon added bug Something isn't working to-review Evidence team to review labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to-review Evidence team to review
Projects
None yet
Development

No branches or pull requests

1 participant