【问题标题】:Having a error lerna success run No packages found with the lifecycle script 'typecheck'有一个错误 lerna 成功运行没有找到生命周期脚本'typecheck'的包
【发布时间】:2020-11-10 20:24:31
【问题描述】:

我在启动 lerna 时遇到问题。我收到错误“lerna 成功运行没有找到生命周期脚本“typecheck”的包。我该如何解决? 我的 package.json

{
 "name": "test-web",
 "private": true,
 "scripts": {
   "typecheck": "lerna run typecheck",
   "prepare": "lerna run prepare"
 },
 "devDependencies": {
   "husky": "^2.4.1",
   "lerna": "^3.22.1",
   "tslint": "^5.17.0"
 },
 "husky": {
   "hooks": {
     "pre-push": "yarn lint && yarn typecheck"
   }
 },
 "workspaces": [
   "frontend/**"
 ],
 "dependencies": {
   "@emotion/core": "^10.0.0",
   "@emotion/styled": "10.0.12",
   "@octokit/core": "^3.2.1",
   "glob": "*",
   "jest-emotion": "10.0.11",
   "prop-types": "^15.5.4",
   "react": "16.8.6",
   "react-router-dom": "5.0.0",
   "react-test-renderer": "16.8.6",
   "redux": "^4.0.5",
   "redux-persist": "5.10.0",
   "typescript": "^4.0.5"
 }
}

我的 lerna.json

{
 "npmClient": "yarn",
 "version": "0.0.1",
 "packages": [
   "frontend/**"
 ],
 "useWorkspaces": true
}

【问题讨论】:

    标签: javascript lerna


    【解决方案1】:

    我找到了修复它的方法。 首先,总是检查你的本地包,它应该包含本地脚本。对我来说,它是类型检查脚本。 其次,始终检查本地脚本中的 devDependencies。 当然,请务必检查您的工作区

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-03
      • 1970-01-01
      • 1970-01-01
      • 2021-09-22
      • 1970-01-01
      • 2011-11-13
      • 2017-10-06
      • 1970-01-01
      相关资源
      最近更新 更多