admin管理员组

文章数量:1415653

I started using lerna to be able to install all node modules for all sub packages using a single mand. At the moment I do not use any other lerna features except lerna bootstrap. My lerna.json:

{
  "lerna": "3.22.0",
  "npmClient": "yarn",
  "packages": [
    "package-a",
    "package-b"
  ],
  "version": "1.0.0"
}

my root package.json:

{
  "name": "test",
  "private": true,
  "version": "1.0.0",
  "scripts": {
    "postinstall": "lerna bootstrap"
  },
  "dependencies": {
    "lerna": "^3.22.1"
  }
}

my package-a's package.json:

{
  "name": "package-a",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "moment": "2.22.0"
  }
}

my package-b's package.json:

{
  "name": "package-b",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "package-a": "1.0.0",
    "moment": "2.22.0"
  }
}

i want to upgrade moment in the package-b. if i run yarn upgrade moment --latest in the package-b folder i got the following error:

yarn upgrade v1.22.5
[1/4] 

本文标签: javascriptHow to upgrade node module of the lerna39s subpackageStack Overflow