You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make lerna a dependency rather than a devDependency #6718
Describe the bug
For context see #6658 . My plugin (I'm assuming others might as well) has GB/master defined as a devDependency because we use gutenberg in jest unit tests. However, since the mentioned pull was merged in we're getting failed builds in travis. Specifically, this is the cause:
> gutenberg@2.8.0 postinstall /home/travis/build/eventespresso/event-espresso-core/node_modules/gutenberg
> lerna bootstrap --hoist
sh: 1: lerna: not found
@aduth and I had a chat about this in slack and it looks like one resolution would be to move lerna from being a devDependency to being a dependency.
Other solutions could be removing the post-install script, or modifying it so it only runs in the context of Gutenberg itself.
Once we've got all the modules published we should add/update the docs on including Gutenberg and its modules for running tests as you are in your eventespresso repo.
Can you clarify what's meant by "it" here? Installing Gutenberg as a dependency?
To me, the general issue is that anything used by postinstall should be defined as a dependencies, since these are run automatically by consuming projects and the consuming project won't install devDependencies.
Can you clarify what's meant by "it" here? Installing Gutenberg as a dependency?
@aduth, I meant to specify Lerna in dependencies. All monorepos aren't designed to be used as a dependency.
With #6752 we moved Lerna to dependencies to make it work in the scenario when someone uses it as the dependency regardless. We will move it back to devDependencies when all modules are published to npm.
Activity
ntwb commentedon May 12, 2018
No objections to this from me.
Once we've got all the modules published we should add/update the docs on including Gutenberg and its modules for running tests as you are in your eventespresso repo.
gziolo commentedon May 15, 2018
I guess it's a temporary solution until we have all packages published. Let me open PR for that.
In general, you shouldn't need to do it. You can double check looking at
package.jsonfiles from Babel, Jest or create-react-app.aduth commentedon May 23, 2018
Can you clarify what's meant by "it" here? Installing Gutenberg as a dependency?
To me, the general issue is that anything used by
postinstallshould be defined as adependencies, since these are run automatically by consuming projects and the consuming project won't installdevDependencies.gziolo commentedon May 24, 2018
@aduth, I meant to specify
Lernaindependencies. All monorepos aren't designed to be used as a dependency.With #6752 we moved
Lernatodependenciesto make it work in the scenario when someone uses it as the dependency regardless. We will move it back todevDependencieswhen all modules are published to npm.