Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Hooks dependencies do not get installed when installing Turboprop from Hex #27

Open
domnantas opened this issue Jul 14, 2024 · 1 comment

Comments

@domnantas
Copy link

Hey, great project!

I understand the project is in its infancy, but I think it's worth adressing installation strategy early on.

Currently, adding {:turboprop, "~> 0.4.2"} to mix.exs, running mix deps.get and adding import { Hooks } from "turboprop" to app.js yields errors related to @zag-js dependencies:

✘ [ERROR] Could not resolve "@zag-js/accordion"

    ../deps/turboprop/hooks/dist/index.mjs:6:27:
      6 │ import * as accordion from "@zag-js/accordion";
        ╵                            ~~~~~~~~~~~~~~~~~~~

  You can mark the path "@zag-js/accordion" as external to exclude it from the bundle, which will remove this error.

This is because turboprop depends on @zag-js and there's no easy way to install those dependencies. cd deps/turboprop && npm install works, but that seems a bit silly. Do you think it is possible to design a user-friendly installation process for Hooks?

@domnantas domnantas changed the title Hooks dependencies are not installed Hooks dependencies do not get installed when installing Turboprop from Hex Jul 15, 2024
@bamorim
Copy link

bamorim commented Jul 30, 2024

I can think of two options here:

  • Publish the hooks in NPM so one can just install it straight from the NPM (use version pairing to make life easier)
  • Include a bundled package together with the hex package

Maybe both are a good idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants