I'm trying to create my monorepo with Lerna. The plan is to reorganize an existing project by pulling out pieces of code that should be their own packages. I launched lerna initand my current setup looks like this:
project/
packages/
new-refactored-package/
package.json
prior-existing-project/
package.json
{ "dependencies" : { "new-refactored-package" : "latest" } }
package.json
{
"devDependencies": {
"lerna": "^2.0.0-rc.5"
}
}
lerna.json
{
"lerna": "2.0.0-rc.5",
"packages": [
"packages/*"
],
"version": "0.0.0"
}
My understanding was what lerna bootstrapat this stage should find package1in the project and symbolically attach it to prior-existing-project /node_modules/new-refactored-package/. From lerna readme :
Download packages in the current Lerna repo. Installs all its dependencies and binds any cross-dependencies.
When launched, this command will:
- npm installs all the external dependencies of each package.
- Symlink integrates all Lerna packages that are dependent on each other.
- npm provide all downloaded packages.
, , lerna npm install new-refactored-package:
npm ERR! 404 Registry 404 GET https://registry.npmjs.org/new-refactored-package
? npm?