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

Add missing dependencies in moveable and svelte-moveable packages #1115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wxgisu
Copy link

@wxgisu wxgisu commented Jun 3, 2024

Problem:
When consuming the svelte-movealbe package in a pnpm monorepo, vite build and vite dev fails with error saying "Cannot find module framwork-utils". However, in an npm managed repo, builds are fine. This is because pnpm requires each package to correctly specify direct dependencies, where npm allow dependencies to be shared across packages.

E.g.

A -> B -> C
|         ↑
-----------

In this case, A and B both directly depend on C. For npm, if A declares C as a dependency, but B does not, it is fine. For pnpm, both A and B has to declare C as a dependency.

Root Cause:

  • The moveable package directly depend on framework-utils, but missing it as a dependency in its package.json file.
  • The svelte-moveable package directly depend on @daybrush/utils, but missing it as a dependency in its package.json file.

Solution:
Adding missing dependencies in corresponding package.json files, under dependencies field because they are labeled as external in the rollup.config.js file.

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

Successfully merging this pull request may close these issues.

None yet

2 participants