ember-credit-card
ember-credit-card copied to clipboard
Hardcoded path of the card dependency breaks when using Yarn 2 in a workspace
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.
I created a PR that fixes the issue: https://github.com/esbanarango/ember-credit-card/pull/76