我在我的应用程序中使用工作区
"workspaces": [
"firstapp/web",
"secondapp"
]
进入第二个应用程序,进入 package.json 我进入依赖项:
"anotherapp": "https://github.com/me/anotherapp.git",
从根目录运行
yarn workspaces foreach -Apt install
一切都好
我跑
yarn workspaces foreach -Apt build
但得到Cannot find module 'anotherapp' or its corresponding type declarations.
我在 CI 和开发期间(在本地)都得到了这个
我不知道出了什么问题
如果我在本地将另一个应用程序导入为
"anotherapp": "../anotherapp"
,它就可以工作。
所以我不知道如何解决它。
我修复了它,将我的包部署到 npmjs