esdoc2 / esdoc2-plugins

MIT License
6 stars 5 forks source link

yarn workspaces and lerna #12

Closed pixelass closed 6 years ago

pixelass commented 6 years ago

clone the repo and run yarn

The following key should be defined in lerna.json

{
  "useWorkspaces": true
}
✔ ~/Documents/workspace/github/esdoc2-plugins [master|✔] 
12:44 $ yarn
yarn install v1.5.1
$ lerna bootstrap --npm-client=yarn
lerna info version 2.9.0
lerna ERR! EWORKSPACES Yarn workspaces are configured in package.json, but not enabled in lerna.json!
lerna ERR! EWORKSPACES Please choose one: useWorkspaces = true in lerna.json, or remove package.json workspaces config
lerna ERR! initialize callback with error
lerna ERR! ValidationError: Yarn workspaces are configured in package.json, but not enabled in lerna.json!
lerna ERR! Please choose one: useWorkspaces = true in lerna.json, or remove package.json workspaces config
lerna ERR!     at new ValidationError (/Users/greada/.config/yarn/global/node_modules/lerna/lib/utils/ValidationError.js:25:120)
lerna ERR!     at BootstrapCommand.initialize (/Users/greada/.config/yarn/global/node_modules/lerna/lib/commands/BootstrapCommand.js:138:25)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c lerna bootstrap --npm-client=yarn
Directory: /Users/greada/Documents/workspace/github/esdoc2-plugins
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/greada/Documents/workspace/github/esdoc2-plugins/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
✘
holmrenser commented 6 years ago

This is updated in #16

MattMcFarland commented 6 years ago

it seems to be running fine on my local after setting workspace property per @holmrenser (works on my machine lol)

Is it working for everyone else? We might be alble to close this :)

MattMcFarland commented 6 years ago

for now, best to use yarn instead of lerna bootstrap, in fact I am planning on replacing lerna with yarn alltogether soon.

pixelass commented 6 years ago

lerna bootstrap seems to cause issues.
lerna bootstrap --npm-client=npm seems to work fine.

Clarify

Use the script yarn bootstrap in package.json to bootstrap the repo

MattMcFarland commented 6 years ago

interesting, I literally just ran yarn <enter>, not needing to use bootstrap. Was that the case for you, or do we need bootstrap?? I'm thinking we might want to ditch lerna and just use yarn workspaces.... thoughts?

pixelass commented 6 years ago

no need to bootstrap. I just tested if the commands work as expected.