Open gabor opened 1 year ago
@gabor
Can you tell me why you are installing croact-moveable yourself?
Although not recommended, if you want to use croact-moveable directly, install croact.
If not, use the following moveable depending on the framework or environment you are using.
@daybrush hi, thanks for the recommendations!
technically speaking i am not installing it alone. i am installing the other parts too, but this is all installed using yarn
, and yarn
makes sure that a package can only see things that it is supposed to see.
and i think, if the package croact-moveable
imports croact
, then it should have croact
in the list of dependencies, shouldn't it?
@gabor
Taking react as an example, the react-moveable
component uses react
as its devDependency.
So I'm using croact
as the devDependency for croact-moveable
as well.
Also, since croact-moveable
is a compatible step component,
I didn't set any dependencies.
Instead I'm using croact
, croact-moveable
from the moveable
package.
Instead I would add peerDependencies.
running the
croact-moveable
package complains that there is a missing dependency.how to reproduce the problem:
npm init
npm add croact-moveable
node
, and inside runrequire('croact-moveable')
you get this error-message:(in this case you can workaround it by just installing
croact
, but if you useyarn
for example, which only allows loading code from packages that your package depends on, it becomes a harder problem)