Recently I added yarn workspaces to my Ember project and I’ve been super happy with the workflow! I’m able to work on an npm package alongside my Ember application without having to worry about
npm link or
However, it seems in doing this I broke
ember install, since it causes yarn to error. Here’s an example.
~/my-ember-app$> ember install ember-cli-clipboard Command failed: yarn add --dev ember-cli-clipboard --non-interactive error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
My workspace root is the Ember app and all of the workspaces are subdirectories in
lib under the Ember application. I think that’s what is causing the issue.
I found this article from Square and it looks like they keep all their workspaces in a packages folder, without any project at the root. Is that what I should be doing if I want to use workspaces in an Ember app?