我对启动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
}
答案 0 :(得分:0)
我找到了解决方法。 首先,请务必检查您的本地软件包,其中应包含本地脚本。对我来说,它是类型检查脚本。 其次,请始终在本地脚本中检查您的devDependencies。 当然,请务必检查您的工作空间