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

Missing jszip dependency in phoenix-ui-components #670

Closed
tmadlener opened this issue Jul 19, 2024 · 0 comments · Fixed by #671
Closed

Missing jszip dependency in phoenix-ui-components #670

tmadlener opened this issue Jul 19, 2024 · 0 comments · Fixed by #671

Comments

@tmadlener
Copy link

When trying to use yarn instead of npm to create an event display for an event display, I ran into the following issue (see also #668 (review) for more details).

ng new event-display-app --style scss --routing true --interactive false
cd event-display-app
yarn set version berry # as recommended by main phoenix documentation
yarn add phoenix-ui-components
yarn add phoenix-event-display
ng generate component main-display

Then doing the necessary adaptions as described and finally

yarn start

leads to

[...]
✘ [ERROR] Could not resolve "jszip"

    .yarn/__virtual__/phoenix-ui-components-virtual-7124f6bf67/5/.yarn/berry/cache/phoenix-ui-components-npm-2.16.0-baa536ee41-10c0.zip/node_modules/phoenix-ui-components/dist/fesm2022/phoenix-ui-components.mjs:40:18:
      40 │ import JSZip from 'jszip';
         ╵                   ~~~~~~~

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

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

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

This can be fixed with

nodeLinker: node-modules

in .yarnrc.yml but maybe there is a way to also make this work with yarn pnp?

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 a pull request may close this issue.

1 participant