我正在创建一个依赖于模块的应用程序。应用程序的文件结构是...
demo-app
|
|----package.json("workspaces": ["module-core/packages/*","src/packages/*" ])
|----src/
| |---packages/
| |---package.json ("workspaces": ["packages/*"])
| |---module-a
| |---package.json("name":"@app/module-a","private":true, "workspaces": ["packages/*"])
| |---module-b
| |---package.json("name":"@app/module-b","private":true, "workspaces": ["packages/*"])
|
|----module-core/
| |---package.json ("workspaces": ["packages/*"])
| |---packages/
| |---core-a
| |---package.json("name":"@app/core-a","private":true, "workspaces": ["packages/*"])
| |---core-b
| |---package.json("name":"@app/core-b","private":true, "workspaces": ["packages/*"])
在这里,
@app/module-a
依赖于@app/core-a
并且@app/module-b
依赖于@app/core-b
。
我在演示应用程序中创建了一个工作区"workspaces": ["module-core/packages/*","src/packages/*"]
。
运行yarn install
时提示错误Couldn't find package "@app/module-a@^0.0.0" required by "@app/module-a@0.1.0" on the "npm" registry
。
工作区管理中是否缺少它?