ember-credit-card icon indicating copy to clipboard operation
ember-credit-card copied to clipboard

Hardcoded path of the card dependency breaks when using Yarn 2 in a workspace

Open jasalguero opened this issue 3 years ago • 1 comments

I'm seeing this error while trying to use the plugin in an Ember project that is using yarn 2 workspaces:

Directory not found: /Users/jasalguero/aplos/work/gaia/fe/packages/payments/node_modules/card/dist

I see the problem is coming from the hardcoded path to retrieve the card plugin in the index.js file

trees.push(
      new Funnel(path.join(this.project.root, 'node_modules', 'card', 'dist'), {
        files: ['card.js'],
      })
    );

And Yarn 2 hoists node_modules dependencies to the parent folder, so the resolution fails.

jasalguero avatar Jul 06 '21 13:07 jasalguero

I created a PR that fixes the issue: https://github.com/esbanarango/ember-credit-card/pull/76

jasalguero avatar Jul 06 '21 13:07 jasalguero