ericzon / eric-lernatest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lerna tests

This is a project for doing some tests about whole lerna workflow.

Useful commands

  • To setup an already existing project, linking dependencies:
lerna bootstrap
  • To trigger a new publish without having to add any change:
lerna publish --force-publish
  • To select a automatically a version type and put ouput in file:
lerna publish patch --force-publish --yes >> lerna-output.txt

Publish packages

Before publishing:

npm login

If your packages are public, remember to remove the private flag in package.json of project root:

"private": true,

And just execute this command:

lerna publish

Troubleshooting

  • To undo a version before publish in registry, you need to checkout changes and remove new created tag

  • As npm registry only allows unpublish in the 48h next hours, if you want to simulate before doing real things, you can always setup a local npm registry. In this example, they use Verdaccio

  • Solving error "You must sign up for private packages"

    If you find this during the process:

    lerna ERR! E402 You must sign up for private packages
    

    If you plan to make this public, remember that in scoped projects is private by default. You can check the current access level doing this:

    npm config get access
    

    Receiving private or null means that you have to set public access in npm:

    npm config set access public
    
  • Solving error "Scope not found". If you get this message:

    lerna ERR! E404 Scope not found
    

    You should only use scopes related with your user or organization. You can create an organization here or check some docs there

References

About

License:Other


Languages

Language:JavaScript 100.0%