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

Error when a v2 addon hosted as a private Github repo imports a v1 addon #2229

Open
andrew-paterson opened this issue Jan 13, 2025 · 0 comments

Comments

@andrew-paterson
Copy link

Embroider is encountering an error when the Ember app consumes a v2 addon which is a privately hosted Github repo, when that addon in turn has dependencies which are v1 addons, as outlined here.

embroider-app
    |-- v2-addon (private github hosted repo)
        |-- v1 addon (public)

This is the error:


Module not found: Error: Can't resolve './@embroider+macros@1.16.10/node_modules/@embroider/macros/src/addon/es-compat2' in '/home/paddy/hyraxbio/ember-versions/test-embroider/node_modules/.pnpm/dist-test-2@git+https+++git@github.com+andrew-paterson+dist-test-2.git#363c469a3456c060d0c199_crho2jy4rlkok4sa6qetet3r2q/node_modules/dist-test-2'

The error does not happen if the repo is set to public, or if it is private but does not in turn have an v1 addons as dependencies.

I noted from the error that it's trying to resolve from ...#363c469a3456c060d0c199_crho2jy4rlkok4sa6qetet3r2q. I'm not sure if it's normal for the last part of the SHA to be replaced with _crho2jy4rlkok4sa6qetet3r2q there.

For what it's worth, these are the enrties for the addon in pnpm-lock.yaml, when private and then public.

Private

  dist-test-2@git+https://git@github.com:andrew-paterson/dist-test-2.git#363c469a3456c060d0c19975a416851a3286bbdd(@aws-sdk/client-sso-oidc@3.726.0(@aws-sdk/client-sts@3.726.1))(@ember/string@3.1.1)(@ember/test-helpers@3.3.1(@babel/core@7.26.0)(ember-source@5.11.1(@glimmer/component@1.1.2(@babel/core@7.26.0))(rsvp@4.8.5)(webpack@5.97.1))(webpack@5.97.1))(@ember/test-waiters@3.1.0)(@embroider/macros@1.16.10)(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glimmer/tracking@1.1.2)(ember-modifier@4.2.0(@babel/core@7.26.0)(ember-source@5.11.1(@glimmer/component@1.1.2(@babel/core@7.26.0))(rsvp@4.8.5)(webpack@5.97.1)))(ember-source@5.11.1(@glimmer/component@1.1.2(@babel/core@7.26.0))(rsvp@4.8.5)(webpack@5.97.1))(eslint@8.57.1)(tracked-built-ins@3.4.0(@babel/core@7.26.0)):

public

dist-test-2@https://codeload.github.com/andrew-paterson/dist-test-2/tar.gz/363c469a3456c060d0c19975a416851a3286bbdd(@aws-sdk/client-sso-oidc@3.726.0(@aws-sdk/client-sts@3.726.1))(@ember/string@3.1.1)(@ember/test-helpers@3.3.1(@babel/core@7.26.0)(ember-source@5.11.1(@glimmer/component@1.1.2(@babel/core@7.26.0))(rsvp@4.8.5)(webpack@5.97.1))(webpack@5.97.1))(@ember/test-waiters@3.1.0)(@embroider/macros@1.16.10)(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glimmer/tracking@1.1.2)(ember-modifier@4.2.0(@babel/core@7.26.0)(ember-source@5.11.1(@glimmer/component@1.1.2(@babel/core@7.26.0))(rsvp@4.8.5)(webpack@5.97.1)))(ember-source@5.11.1(@glimmer/component@1.1.2(@babel/core@7.26.0))(rsvp@4.8.5)(webpack@5.97.1))(eslint@8.57.1)(tracked-built-ins@3.4.0(@babel/core@7.26.0)):
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

No branches or pull requests

1 participant