lerna: [Question] Lerna is trying to install a local package from NPM, what am i doing wrong?

I’m converting an existing project to use lerna

My lerna ls looks line that:

Lerna v2.0.0-beta.36
- extension (private)
- companyname-parser (private)
- companyname-log (private)

But when i run lerna bootstrap i get:

...
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/companyname-parser
npm ERR! 404 
npm ERR! 404  'companyname-parser' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

Means lerna is trying to install it from npm instead of linking it

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 17 (8 by maintainers)

Most upvoted comments

@evocateur FYI this happened when the dependency was given as "*". In other words, "*" does not seem to match v1.5.0-alpha1.

This can happen if the current version of the dependee in your repository doesn’t fulfill the version range listed in the dependent. (e.g. if a has a dependency on b ^1.0.0, but b lists its version as 2.0.1, then lerna will install it from npm). Can you include the version of companyname-parser and the version name of whatever package is emitting the error? The other thing that I can think of is that npm checks the registry for a lot of commands that you might not think it would check the registry for (e.g. npm link). Can you post the full npm-debug.log, which should include more information about what npm command is checking the registry?

That makes sense. Peer + dev dep is a very common pattern for this use case.

On Feb 5, 2017, at 11:44, Bnaya Peretz notifications@github.com wrote:

So as i see it, its a devDependency and peerDependency Becouse i need my package to share the exact same module instance (even when bundled when webpack, which requires additional setup)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.