lerna: Lerna error: `package.json` does not exist, have you run `lerna init`?
I run lerna bootstrap
Current Behavior
> lerna bootstrap
lerna notice cli v3.8.0
lerna ERR! ENOPKG `package.json` does not exist, have you run `lerna init`?
Expected Behavior
Should work
Specs
lerna.json
{
"version": "0.0.5-alpha.0",
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true
}
package.json
{
"private": true,
"workspaces": [
"packages/*",
"examples/*"
],
"devDependencies": {
"lerna": "^3.8.0"
}
}
Executable | Version |
---|---|
lerna --version |
3.8.0 |
npm --version |
6.5.0 |
yarn --version |
1.13.0 |
node --version |
v11.4.0 |
OS | Version |
---|---|
Windows 10 x64 | 1703 |
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (3 by maintainers)
Commits related to this issue
- fix lerna issue https://github.com/lerna/lerna/issues/1835 — committed to BlueBrain/nexus-js by kenjinp 5 years ago
- Revert "fix lerna issue https://github.com/lerna/lerna/issues/1835" This reverts commit 0318a7784c15409405a08acbe7d2da89c580017f. — committed to BlueBrain/nexus-js by kenjinp 5 years ago
- 👷‍♀️ FIX: upgrade packages to fix security issue (#280) * yarn upgrade to fix security issue * fix lerna issue https://github.com/lerna/lerna/issues/1835 * Revert "fix lerna issue https://gith... — committed to BlueBrain/nexus-js by kenjinp 5 years ago
- build(lerna): fix package and lerna to run on non-root folder https://github.com/lerna/lerna/issues/1835#issuecomment-449663103 — committed to ecomplus/storefront-cms by leomp12 3 years ago
It’s work if i add field
name
topackage.json
with valueroot
We should definitely improve the error message in this case, I agree.
Same error when version field is missing in lerna.json
I’ve just started seeing this issue after upgrading a Yarn 2 project that’s been working fine with Lerna to v4, but we already have the config options mentioned above as causing trouble if they’re absent: